CompTIA Linux+ (XK0-004) — Question 62
An administrator needs to look at a log for an application on a systemd-based system. There is no log for this application in /var/log. Which of the following is another way to view the application log on this system?
Answer options
- A. tail -f /var/log/secure
- B. journalctl ג€"u application
- C. systemctl application.service
- D. watch /var/lib/application/
Correct answer: A
Explanation
The correct option is A, as it allows the administrator to continuously monitor the secure log for any relevant application entries. While B is a viable command for viewing logs related to a specific unit, it may not be applicable if the application does not log to the journal. Options C and D do not directly relate to viewing logs for the application.