• Home
  • Shell
    • Emacs
    • Perl
    • screen
    • sed
  • Ubuntu
    • VNC
  • Web Development
    • Javascript
    • Joomla
    • MySQL
    • osTicket
  • Windows
    • Gimp

Posts tagged man

MAN PAGE> ‘date’ (8.4)

Jan30
2013
Written by Scott Rowley

Note that this man page is regarding date version ‘date (GNU coreutils) 8.4’, your mileage may vary when using other versions.

I’m going to expand this section to include examples of every entry from the man page. Note that some examples include additional commands to demonstrate the information we are working with.

NAME
date — print or set the system date and time

SYNOPSIS
date [OPTION]… [+FORMAT]
date [-u|–utc|–universal] [MMDDhhmm[[CC]YY][.ss]]

DESCRIPTION
Display the current time in the given FORMAT, or set the system date.

-d, –date=STRING
display time described by STRING, not ‘now’

date
Wed Jan 30 10:08:18 CST 2013
date -d "1 year ago"
Mon Jan 30 10:08:33 CST 2012

-f, –file=DATEFILE
like –date once for each line of DATEFILE

cat years.txt
1 year ago
2 years ago
3 years ago
date -f years.txt
Mon Jan 30 10:19:17 CST 2012
Sun Jan 30 10:19:17 CST 2011
Sat Jan 30 10:19:17 CST 2010

READ MORE »

Posted in BASH - Tagged BASH, cat, date, example, Format, man page, page, shell, time

Corrections? Questions? Comments?

Find an error?
Everything work out great for you?
Have some feedback?
Like to see something added to the article?

PLEASE leave us a comment after the article and let us know how we are doing, or if something needs corrected, improved or clarified.

Thank you!
- The Management

Advertisement

Sudo Bash
By Geeks - For Geeks

Back to Top