exam questions

Exam XK0-005 All Questions

View all questions & answers for the XK0-005 exam

Exam XK0-005 topic 1 question 37 discussion

Actual exam question from CompTIA's XK0-005
Question #: 37
Topic #: 1
[All XK0-005 Questions]

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?

  • A. tail -v 20
  • B. tail -n 20
  • C. tail -c 20
  • D. tail -l 20
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
LinusSusTips
11 months, 1 week ago
-l is an invalid option!
upvoted 1 times
...
linux_admin
1 year ago
The correct command to look at the last 20 lines of a log is tail -n 20. The tail command is used to display the last part of a file, and the -n option is used to specify the number of lines to display. In this case, the administrator wants to display the last 20 lines of the log, so the correct command is tail -n 20.
upvoted 4 times
...
poni0331
1 year, 2 months ago
Selected Answer: B
B is the correct answer. Tail displays the last 10 lines by the default. The flag -n refers to the “number of lines”
upvoted 2 times
poni0331
1 year, 2 months ago
… followed by the number of lines specified
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...