Multiple choice technology operating systems

What command used to show the last few lines of a file?

  1. tail

  2. head

  3. last

  4. more

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The 'tail' command displays the last few lines of a file (by default, the last 10 lines). This is the opposite of 'head' which shows the beginning of a file. The 'last' command shows login history, not file content, and 'more' displays files page by page from the beginning.

AI explanation

The tail command displays the last lines of a file by default (typically the last 10, or a custom count with -n). head does the opposite, showing the beginning of the file, and last/more serve different purposes (login history and paginated viewing, respectively).