LFCS practice question 11 of 35
Which of the following parameters are used for journalctl to limit the time frame of the output? (Choose TWO correct answers.)
Full set: 260 questionsThe journalctl command provides options to filter log entries based on a specific time window. The --since option is used to define the start of the time frame, showing all entries logged at or after the specified time. Conversely, the --until option defines the end of the time frame, showing all entries logged at or before the specified time. Both options accept various time and date string formats, such as "YYYY-MM-DD HH:MM:SS" or relative values like "yesterday" or "1 hour ago", allowing for precise control over the log output.
A. --from= is not a valid time-limiting option for the journalctl command.
D. --upto= is not a valid time-limiting option for the journalctl command.
E. --date= is not a primary option for defining a time range in journalctl; --since and --until are the correct options for this purpose.
1. journalctl(1) man page. "Show all messages since the specified date. The date specification should be of the format "YYYY-MM-DD HH:MM:SS"." (Section: Options, description for --since=DATE).
2. journalctl(1) man page. "Show all messages until the specified date. The date specification should be of the format "YYYY-MM-DD HH:MM:SS"." (Section: Options, description for --until=DATE).
3. Freedesktop.org, systemd Documentation, journalctl. "Options --since= and --until= can be used to limit the entries shown to a specific time window." (https://www.freedesktop.org/software/systemd/man/journalctl.html).
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 3Which of the following tasks can be accomplished using the command date? (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…
