Editing Date (command)
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | + | <code>date</code><ref>http://man7.org/linux/man-pages/man1/date.1.html</ref> command allows to print or set the system date and time. | |
− | <code>date</code><ref>http://man7.org/linux/man-pages/man1/date.1.html</ref> command allows to print or set the system date and | ||
− | == | + | == Basic Examples == |
− | + | <pre> | |
− | + | $ date -d now | |
− | + | Wed Aug 18 16:47:31 EDT 2019 | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | $ date -d today | |
− | + | Wed Aug 18 16:47:32 EDT 2019 | |
− | |||
− | |||
− | |||
− | |||
$ date -d yesterday | $ date -d yesterday | ||
Tue Aug 17 16:47:33 EDT 2019 | Tue Aug 17 16:47:33 EDT 2019 | ||
Line 42: | Line 25: | ||
$ date +%b | $ date +%b | ||
Aug | Aug | ||
− | |||
− | |||
− | |||
$ date +%B | $ date +%B | ||
Line 55: | Line 35: | ||
2020-11-22_12:18-UTC | 2020-11-22_12:18-UTC | ||
− | |||
− | |||
− | |||
− | + | MacOS: | |
+ | $ date +%F_-%T | ||
+ | 2020-08-03_-09:14:54 | ||
− | + | </pre> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Activities == | == Activities == | ||
# Read <code>date</code> man page: http://man7.org/linux/man-pages/man1/date.1.html | # Read <code>date</code> man page: http://man7.org/linux/man-pages/man1/date.1.html | ||
− | |||
− | |||
− | |||
− | |||
== See also == | == See also == | ||
− | |||
− | |||
− | |||
[[Category:Linux]] | [[Category:Linux]] |
Advertising: