010-100 · Question #67
In which directory are system log files kept?
The correct answer is B. /var/log/. The Linux Filesystem Hierarchy Standard designates /var/log/ as the canonical directory for all system and application log files.
Question
In which directory are system log files kept?
Options
- A/log/syslog/
- B/var/log/
- C/sys/log/
- D/var/log/sys/
How the community answered
(17 responses)- A6% (1)
- B76% (13)
- C12% (2)
- D6% (1)
Why each option
The Linux Filesystem Hierarchy Standard designates /var/log/ as the canonical directory for all system and application log files.
/log/syslog/ does not exist as a defined path in the Linux FHS and is not created by any standard distribution.
/var/log/ is defined by the FHS as the standard location for log files and directories, containing files such as syslog, auth.log, kern.log, and application-specific logs. All major Linux distributions comply with this standard, making /var/log/ the correct and universally expected location.
/sys is a virtual pseudo-filesystem that exposes kernel objects and hardware information at runtime; it contains no persistent log files.
/var/log/sys/ is not a standard sub-directory; log files reside directly under /var/log/ or in application-specific sub-directories like /var/log/apache2/, not under a generic sys/ folder.
Concept tested: Linux Filesystem Hierarchy Standard log directory location
Source: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05s13.html
Topics
Community Discussion
No community discussion yet for this question.