Bird
0
0

What does the head command do by default when run on a text file?

easy📝 Conceptual Q11 of 15
Linux CLI - Viewing and Editing Files
What does the head command do by default when run on a text file?
ACounts the number of lines in the file
BShows the last 10 lines of the file
CDeletes the first 10 lines of the file
DShows the first 10 lines of the file
Step-by-Step Solution
Solution:
  1. Step 1: Understand the default behavior of head

    The head command shows the start of a file, by default 10 lines.
  2. Step 2: Compare with other options

    tail shows the end, but head shows the beginning lines.
  3. Final Answer:

    Shows the first 10 lines of the file -> Option D
  4. Quick Check:

    head = first 10 lines [OK]
Quick Trick: Remember: head = start, tail = end of file [OK]
Common Mistakes:
  • Confusing head with tail
  • Thinking head deletes lines
  • Assuming head counts lines

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes