nerdexam
LPI

010-150 · Question #26

Which of the following directories is often used to store log files?

The correct answer is B. /var. In Linux, the /var directory holds variable data including log files, making it the standard location for system and application logs.

Finding Your Way on a Linux System

Question

Which of the following directories is often used to store log files?

Options

  • A/home
  • B/var
  • C/temp
  • D/dev
  • E/usr

How the community answered

(21 responses)
  • B
    71% (15)
  • C
    14% (3)
  • D
    5% (1)
  • E
    10% (2)

Why each option

In Linux, the /var directory holds variable data including log files, making it the standard location for system and application logs.

A/home

/home is reserved for user home directories and personal files, not system or application logs.

B/varCorrect

The /var directory is defined by the Filesystem Hierarchy Standard to hold variable data - files whose content is expected to change continually during normal system operation. Log files are stored under /var/log, and subdirectories such as /var/log/syslog and /var/log/messages are the standard locations for system logging daemons to write output.

C/temp

/temp is not a valid standard Linux directory; the correct temporary directory is /tmp, which holds short-lived files, not logs.

D/dev

/dev contains special device files that represent hardware and virtual devices, not log data.

E/usr

/usr holds read-only user utilities, libraries, and application binaries, not runtime log data.

Concept tested: Linux Filesystem Hierarchy Standard /var directory

Source: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05.html

Topics

#filesystem hierarchy#/var#log files#directory structure

Community Discussion

No community discussion yet for this question.

Full 010-150 Practice