Which command would you use to see the last 10 lines of a file?

Prepare for the LPIC-2 Certification Test with our study tools, including flashcards and multiple choice questions with hints and explanations. Get ready to pass your exam!

The command used to see the last 10 lines of a file is "tail filename". This command is specifically designed to display the end portion of files. By default, when no options are specified, it shows the last 10 lines, making it very useful for quickly checking the most recent additions or changes made to a file, such as log files where new data is appended at the end.

Other commands like "head" display the first 10 lines of a file, which is not what is needed for this task. The "cat" command concatenates and displays the entire content of a file, which is not efficient when only the last few lines are required. The "last" command is used for displaying user login information and does not pertain to reading file contents. Each of these alternatives has its specific use cases, but for the purpose of viewing the last lines of a file, "tail" is the correct choice.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy