Here are some common options for the date command in Linux:
-
+FORMAT: Customize the output format. For example:date "+%Y-%m-%d %H:%M:%S"This will display the date in the format
YYYY-MM-DD HH:MM:SS. -
-u: Display the date and time in Coordinated Universal Time (UTC).date -u -
-d STRING: Display the date and time described by the STRING. For example:date -d "next Friday" -
-s STRING: Set the system date and time to the specified STRING. This usually requires superuser privileges.sudo date -s "2023-10-01 12:00:00" -
-R: Display the date in RFC 2822 format.date -R -
-I: Output the date in ISO 8601 format.date -I
These options allow you to format and manipulate date and time information effectively.
