Linux Command Directory
This directory of Linux commands is from Linux in a Nutshell, 5th Edition.
Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.
Buy it now, or read it online on Safari Bookshelf.
hwclock
hwclock [option]
System administration command. Read or set the hardware clock. This command maintains change information in /etc/adjtime, which can be used to adjust the clock based on how much it drifts over time. hwclock replaces the clock command. The single-letter options are included for compatibility with the older command.
Options
You may specify only one of the following options:
Adjust the hardware clock based on information in /etc/adjtime and set the system clock to the new time.
Print the kernel's hardware clock epoch value, then exit.
Print the current time stored in the hardware clock.
Set the system time in accordance with the hardware clock.
Set the hardware clock's epoch to year.
Set the hardware clock to the specified date, a string appropriate for use with the date command.
Print version and exit.
Set the hardware clock in accordance with the system time.
The following may be used with the above options.
Print information about what hwclock is doing.
The hardware clock is stored in local time.
Disable /etc/adjtime facilities.
Do not actually change anything. This is good for checking syntax.
The hardware clock is stored in Universal Coordinated Time.




