Hi all,
I have used a bash script which ultimately converts a string into date using date --date option:
Code:
DATE=$DATE" "$TIME" "`date +%Y` //concatenating 2 strings
TMRW_DATE=`date --date="$DATE" +"%s"` //applying date command on string and getting the unixtime
Moderator's Comments:
I'm running Ubuntu 12.04. When I try to use the Time & Date control panel to change the date backwards, it just immediately springs back to whatever the real date is.
I've got it set to "manual" now.
How can I change the date backwards? I'd really like to set it to the correct date minus one year.
How can I allow users to change the date and time in a script? Say the user1 wil login and he will be inputting the desired date (example format below). I will need this script so the user can login and change the date anytime during the day. I will not allow him to use any command except the date change so Im planning to incorporate a menu script on it. Pls help.
Hi
Summary:
- Script will take 2 arguments
- Argument 1: Date/Time value in a particular format
- Argument 2: TimeZone value
Code:
Examples:
Argument 1:
a. "May 11, 2012 08:00:00 AM"
b. "Dec 21, 2012 12:21:12 PM"
c. "Oct 2, 2012 05:00:00 PM"
Argument 2:
a. MT or MST or MDT
b. ET
c. PT or PCT
d. GMT / UTC
e. CT
d.
Hello,Lately the time on my computer gets getting screwed up, setting itself to UTC instead of local time. I have to change it manually each time. Setting the option "Set time and date automatically" doesn't work very well. Most of the time, it says "Unable to contact time server".
I'm looking for a way to have the "date" command output the date in a specific format.
I'm not familiar with the different ways to use the date command at all.
I wanted to know what is the best way to monitor use of memory on an RHEL server. We have 16 GB of memory for the RHEL instance but the usage at any time is more than 99%. I use /proc/meminfo on the server to check memory.
I hope, my question is clear that what is the best way to monitor use of memory on an RHEL server.
Please revert with the reply to my query.
Regards
I had a query that should the RHEL servers in production environment be re-started say every 2-3 months so that the cache is cleared?
I hope, my question is clear that should the Red Hat Linux servers be restarted periodically.
Please revert with the reply to my query.
Regards
Hello,
Is it possible to put the date in the backup file?
The cpbackup run every day and send backups to a remote FTP server, with the name "user.tar.gz", it is possible change the name to "user.YYYY.MM.DD.tar.gz"?
I believe that the code responsible for this in cpbackup is:
Code:
(...)
my $target_file = ( $CONF{'COMPRESSACCTS'} eq 'no' ?