Gnu date manual






















 · On GNU and POSIX systems, the Epoch is UTC, so ‘@0’ represents this time, ‘@1’ represents UTC, and so forth. GNU and most other POSIX-compliant systems support such times as an extension to POSIX, using negative counts, so that ‘@-1’ represents UTC. Print a date without the leading zero for one-digit days of the month, you can use the (GNU extension) '-' modifier to suppress the padding altogether. $ date -d=1may '+%B %-d' Print the current date and time in the format required by many non-GNU versions of 'date' when setting the system clock: $ date +%m%d%H%M%Y.%S Set the system date and time. Examples of date (GNU Coreutils ) To print the date of the day before yesterday: date --date='2 days ago'. To print the date of the day three months and one day hence: date --date='3 months 1 day'. To print the day of year of Christmas in the current year: date --date='25 Dec' +%j. To print the current full month name and the day of the month.


The --date=STRING is a mostly free format human readable date string such as "Sun, " or " " or even "next Thursday". A date string may contain items indicating calendar date, time of day, time zone, day of week, relative time, relative date, and numbers. An empty string indicates the beginning of the day. Here, date is the date (see the -D or --date-format option for details), string is the centered header string, and page identifies the page number. The LC_MESSAGES locale category affects the spelling of page ; in the default C locale, it is ‘ Page number ’ where number is the decimal page number. On GNU and POSIX systems, the Epoch is UTC, so ‘@0’ represents this time, ‘@1’ represents UTC, and so forth. GNU and most other POSIX-compliant systems support such times as an extension to POSIX, using negative counts, so that ‘@-1’ represents UTC.


These characters are similar to but not completely identical to those defined by GNU date and POSIX strftime(3c). The format specifiers which do not. #!/bin/bash # Exercising the 'date' command echo "The number of days suffix=$(date +%s) # The "+%s" option to 'date' is GNU-specific. filename=$prefix. R is 'GNU S', a freely available language and environment for statistical up-to-date, versions of code and documentation for R. Please use the CRAN.

0コメント

  • 1000 / 1000