LFCS practice question 3 of 35
Which of the following tasks can be accomplished using the command date? (Choose TWO correct answers.)
Full set: 260 questionsThe date command is a standard utility for displaying and setting the system's date and time. It can format the output in numerous ways using the +FORMAT specifier (e.g., date +"%Y-%m-%d"). With appropriate privileges (typically root), it can also set the system clock using the -s or --set option (e.g., date -s "2 JAN 2023 18:00:00"). It does not, however, interact directly with the hardware clock or manage NTP synchronization, which are handled by other specialized tools like hwclock and chronyd/ntpd.
A. Synchronizing the hardware and system clocks is done with hwclock or timedatectl, not date.
D. Setting the hardware clock is the responsibility of the hwclock or timedatectl commands.
E. NTP synchronization is managed by daemons like ntpd or chronyd, not the date command.
- date(1) manual page. In the DESCRIPTION section, it states, "Display the current time in the given FORMAT, or set the system date." It details the +FORMAT controls and the -s, --set=STRING option. (Source: GNU Coreutils documentation, available via man date on any standard Linux system).
- Red Hat Enterprise Linux 8 Documentation, "Configuring basic system settings", Section 4.5. "Configuring the date and time". This section describes using timedatectl for most modern tasks but acknowledges the use of date for setting the system time.
Keep practicing
Take the free LFCS practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other LFCS practice questions
- Question 1Which of the following commands should be added to /etc/bash_profile in order to change t…
- Question 2Which of the following commands reboots the system when using SysV init? (Choose TWO corr…
- Question 4Which of the following environment variables overrides or extends the list of directories…
- Question 5Which of the following are syslog facilities? (Choose TWO correct answers.)
- Question 6Which of the following programs uses the hosts.allow file to perform its main task of che…
- Question 7What does the ? symbol within regular expressions represent?
