|
||
|
Useful date command options
The date command displays the date and the time of day. The standard output of the date command looks like this:
$ date Sat Sep 25 14:38:35 PDT 1999
The date command lets you use options to display pieces of the date and time information in a selected format. If you want to display
only the day of the month, you would use this command:
$ date +%e 25
Start the format specification with a plus sign. Follow this with one or more percent-sign-marked letters, which
indicate which piece of the date you want. The %e represents the day of the month. %b represents the 3-letter
abbreviation for the month:
$ date +%b Sep $ date +%b-%e Sep-25 Test out these date command options by logging into your UNIX account and typing them in at the shell prompt. |
||
|
|
||