CompTIA Linux+ (XK0-005) — Question 79

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?

Answer options

Correct answer: B

Explanation

The correct command to display the last 20 lines of a log file is 'tail -n 20', as the '-n' option specifies the number of lines to show. The other options are incorrect because '-v' is for verbose output, '-c' displays bytes instead of lines, and '-l' is not a valid option for the 'tail' command.