nerdexam
LPI

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.

Finding Your Way on a Linux System

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)
  • A
    6% (1)
  • B
    76% (13)
  • C
    12% (2)
  • D
    6% (1)

Why each option

The Linux Filesystem Hierarchy Standard designates /var/log/ as the canonical directory for all system and application log files.

A/log/syslog/

/log/syslog/ does not exist as a defined path in the Linux FHS and is not created by any standard distribution.

B/var/log/Correct

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

C/sys/log/

/sys is a virtual pseudo-filesystem that exposes kernel objects and hardware information at runtime; it contains no persistent log files.

D/var/log/sys/

/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

#log files#syslog#Linux directory structure

Community Discussion

No community discussion yet for this question.

Full 010-100 Practice