www.delorie.com/gnu/docs/textutils/coreutils_133.html   search  
 
Buy GNU books!


GNU Core-utils

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

21.1 date: Print or set system date and time

Synopses:

 
date [option]... [+format]
date [-u|--utc|--universal] 
[ MMDDhhmm[[CC]YY][.ss] ]

Invoking date with no format argument is equivalent to invoking `date '+%a %b %e %H:%M:%S %Z %Y''.

If given an argument that starts with a `+', date prints the current time and date (or the time and date specified by the --date option, see below) in the format defined by that argument, which is the same as in the strftime function. Except for directives, which start with `%', characters in the format string are printed unchanged. The directives are described below.

21.1.1 Time directives  %[HIklMprsSTXzZ]
21.1.2 Date directives  %[aAbBcdDhjmUwWxyY]
21.1.3 Literal directives  %[%nt]
21.1.4 Padding  Pad with zeroes, spaces (%_), or nothing (%-).
21.1.5 Setting the time  Changing the system clock.
21.1.6 Options for date  Instead of the current time.
21.1.7 Examples of date  Examples.


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright © 2003   by The Free Software Foundation     Updated Jun 2003  

Please take a moment to fill out this visitor survey
You can help support this site by visiting the advertisers that sponsor it! (only once each, though)