by Oliver; 2014
43. date, cal
date prints the date:
$ date
Sat Mar 21 18:23:56 EDT 2014
You can choose among many formats.
For example, if the date were March 10, 2012, then:
$ date "+%y%m%d"
120310
$ date "+%D"
03/10/12
Print the date in seconds since 1970:
$ date "+%s"
cal prints a calendar for the current month, as in:
$ cal
January
Su Mo Tu We Th Fr Sa
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
See the calendar for the whole year:
$ cal -y
See the calendar for, say, December 2011:
$ cal 12 2011
<PREV
NEXT>