Co robi DATE użycie. Konsola text strings (blanks must be quoted) as well as field descriptors.

Czy przydatne?

Polecenie date

Wykonanie, użycie: Print the current date and time. You may specify a display format. format can consist of literal text strings (blanks must be quoted) as well as field descriptors, whose values will appear as described in the following entries (the listing shows some logical groupings). A privileged user can change the system's date and time

Opcje wykonania date w konsoli


Display current date in a nonstandard format. For example:

$date +"%A %j %n%k %p" Tuesday 248 15 PM

The default is %a %b %e %T %Z %Y (e.g., Tue Sep 5 14:59:37 EDT 2005).

-d date, --date date

Display date, which should be in quotes and may be in the format d days or m months d days, to print a date in the future. Specify ago to print a date in the past. You may include formatting (see the following section).

-f datefile, --file=datefile

Like -d, but printed once for each line of datefile.

-I [timespec] , --iso-8601[=timespec]

Display in ISO-8601 format. If specified, timespec can have one of the following values: date (for date only), hours, minutes, or seconds to get the indicated precision.

-r file, --reference=file

Display the time file was last modified.

-R, --rfc-822

Display the date in RFC 822 format.


Print help message and exit.


Print version information and exit.

-s date, --set date

Set the date.

-u, --universal

Set the date to Greenwich Mean Time, not local time.

Przykłady date działanie w Słownik polecenie D