The date command of Linux Command Encyclopedia

The Linux  date  command can be used to display or set the system date and time.

grammar

date [OPTION]... [+FORMAT]
date [-u] [-d datestr] [-s datestr] [--utc] [--universal] [--date=datestr] [--set=datestr] [--help] [--version] [+FORMAT] [MMDDhhmm[[CC]YY][.ss]]

optional parameters

  • -d, --date=STRING : display time format by string, string cannot be 'now'.
  • -f, --file=DATEFILE : Similar to --date; process from DATEFILE one line at a time.
  • -I[FMT], --iso-8601[=FMT] : Output time in ISO 8601 format, FMT can be 'date' (default), 'hours', 'minutes', 'seconds', 'ns'. Can be used to set the precision of date and time, for example: 2006-08-14T02:34:56-0600.
  • -R, --rfc-2822  : Output time and date in RFC 5322 format, eg: Mon, 14 Aug 2006 02:34:56 -0600.
  • --rfc-3339=FMT : Output according to RFC 3339 format, FMT can be one of 'date', 'seconds', 'ns', can be used for

Guess you like

Origin blog.csdn.net/m0_37449634/article/details/131432311