The date and time of the server.

$ date
Tue Mar 17 18:13:30 CET 2009

Set the date to the date and time shown:

$ date -s "11/20/2008 12:48:00"

List the time and date in the below format:

$ date '+DATE: %m/%d/%y%nTIME:%H:%M:%S'
DATE: 02/08/01
TIME:16:44:55

Other format (useful for generating an unique timestamp):

$ date +%y%m%d%H%M%S
090317111734

or

$ date +%y%m%d%H%M%S%N
090317171434411727000
‘date’ Command Examples
Tagged on:     

Leave a Reply

Your email address will not be published. Required fields are marked *