The field descriptors mentioned in the previous post are:
a- abbreviated weekday name
A- full weekday name
b- abbreviated month name
B- full month name
c- country specific date and time format
d- day of month 01 to 31
D- date as %m/%d/%y
e- day of month 1 to 31(single digits are preceeded by a blank.
h- abbreviated month name(alias for %b)
H- hour 00 to 23
I- hour 1 to 12
j- day of year 001 to 366
m- month of year 01 to 12
M- minute 00 to 59
n- insert a new line character
p- string containing anti-meridiem(A.M.-before noon ) or post meridiem(PM- after noon)
r- time as %I:%M:%S:%p
R- time as%H:%M
S- second 00 to 61 allow for leap seconds
t- insert a tab character
T- time as %H:%M:%S
U- week number of year(Sunday as first day of the week)-0 to 53
w- day of week sunday = 0
W- week number of year(Monday as first day of the week) 00 to 53
x- Country specific date format
X- Country specific time format
y- Year within century 00 to 99
Y- year as ccyy(4 digits)
Z- time zone name
Lists the date and time of the server. Below is an example of the output.
Fri Nov 11 16:47:32 MST 2011
2.date '+DATE: %m/%d/%y%nTIME:%H:%M:%S'
Would list the time and date in the following format.
The following example would work only if you are the super user:
3.date -s "11/11/2011 01:48:00"
Sets the date to the date and time shown.
The next post would be about the who command.