nerdexam
CompTIACompTIA

XK0-005 · Question #1518

XK0-005 Question #1518: Real Exam Question with Answer & Explanation

The correct answer is B: tail -n 20. {"question_number": 1, "explanation": "The tail command is used to display the end of a file. The -n flag specifies the number of lines to display. So tail -n 20 outputs the last 20 lines of a file or input. The -c flag specifies bytes (not lines), -v enables verbose header outpu

System Management

Question

A systems administrator is checking the system logs. The administrator wants to look at the last 20 lines of a log. Which of the following will execute the command?

Options

  • Atail -v 20
  • Btail -n 20
  • Ctail -c 20
  • Dtail -l 20

Explanation

{"question_number": 1, "explanation": "The tail command is used to display the end of a file. The -n flag specifies the number of lines to display. So tail -n 20 outputs the last 20 lines of a file or input. The -c flag specifies bytes (not lines), -v enables verbose header output (not line count), and -l is not a valid tail option. Therefore, the correct answer is B.", "generated_by": "claude-sonnet", "llm_judge_score": 5}

Topics

#Linux commands#Log management#File viewing#tail command

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions