GNU/Linux Command – DATE

date – Print/Set the system data and time


date will print the time information in different formats and user can also make a custom formats using the options.
$ date -- Print the current date and time.  $ date --rfc -- Print the date in RFC-822 format.  $ date -u -- Print time in UTC format.  $ date -d '3year ago' -- Same date but 3 yrs ago.  $ date -d '3year' -- Same date but after 3 yrs.  $ date --date='2 days ago' -- Day before yesterday.  $ date --date='2 days' -- Day after tomorrow.  $ date --set='-10 minutes' -- Reduce 10m in current time and set.  $ date '+%b %_e %a %T %p %Z %Y' -- Current date in custom format.
Read : info date or man date

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: