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 questions
Answer options
A: --from=
B: --since= Correct answer
C: --until= Correct answer
D: --upto=
E: --date=
Correct Answer:
B. --since=; C. --until=
Explanation

The 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.

Why Incorrect

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.

References

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).

Scroll to Top