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)- A86% (36)
- B2% (1)
- C7% (3)
- D5% (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.