Книга: Fedora™ Unleashed, 2008 edition

Using the hwclock Command

Using the hwclock Command

Use the hwclock command to display or set your Linux system time, display or set your PC's hardware clock, or to synchronize the system and hardware times. To see your hardware date and time, use hwclock with its --show option like so:

# hwclock --show
Fri 27 Jan 2006 02:17:53 PM GMT -0.193809 seconds

Use hwclock with its --set and --date options to manually set the hardware clock like so:

# hwclock --set --date "01/27/06 08:00:00"
# hwclock --show
Tue 27 Jan 2006 08:00:08 AM GMT -0.151718 seconds

In these examples, the hardware clock has been set with hwclock, which is then used again to verify the new hardware date and time. You can also hwclock to set the Linux system date and time date, using your hardware clock's values with the Linux system date and time.

For example, to set the system time from your PC's hardware clock, use the --hctosys option as follows:

# hwclock --hctosys

Оглавление книги

Оглавление статьи/книги

Генерация: 1.320. Запросов К БД/Cache: 3 / 1
поделиться
Вверх Вниз