Showing the date and time
The date command will display the day of the week, the
day and month, the time (24-hour format), time zone and the year.
Just type date at the prompt to get the information.
There are a number of options you can use to tailor the command to your
needs. Here are some sample commands.
date +%a gives you abbreviated weekday name.
date +%D gives you (m/d/y) format.
date +%j gives you day of year.
There are many more options available. See the Unix manual pages for details.
Last modified
July 20, 2004
by cawalker
|