nerdexam
CompTIA

XK0-005 · Question #10790

A Linux administrator needs to check the content of a log file that is appending data as the file grows. Which of the following commands should the administrator use to accomplish this task?

The correct answer is A. tail -f log.txt. The -f option allows the tail command to follow the file, meaning it will keep showing new content as it is appended to the log file. This is useful for monitoring log files in real-time.

System Management

Question

A Linux administrator needs to check the content of a log file that is appending data as the file grows. Which of the following commands should the administrator use to accomplish this task?

Options

  • Atail -f log.txt
  • Btail -v log.txt
  • Ctail -c log.txt
  • Dtail log.txt

How the community answered

(42 responses)
  • A
    86% (36)
  • B
    2% (1)
  • C
    7% (3)
  • D
    5% (2)

Explanation

The -f option allows the tail command to follow the file, meaning it will keep showing new content as it is appended to the log file. This is useful for monitoring log files in real-time.

Topics

#Linux commands#Log file management#File monitoring#tail command

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice