Lpi Linux Essentials 010 160 · Free Practice Question Easy

Question 21

Which command will display the last line of the file document.txt?
  • A head -n 1 document.txt
  • B tail -n 1 document.txt
  • C tail document.txt
  • D last -n 1 document.txt
Reveal correct answer

Correct answer: B

Explanation

OBJ-3.2: The tail command with the -n 1 option will show the last line of a file.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need