Bird
0
0

Which command will display the first 15 lines of a file named report.txt?

easy📝 Conceptual Q2 of 15
Linux CLI - Viewing and Editing Files
Which command will display the first 15 lines of a file named report.txt?
Ahead -n 15 report.txt
Btail -n 15 report.txt
Chead +15 report.txt
Dtail -15 report.txt
Step-by-Step Solution
Solution:
  1. Step 1: Identify the command to show the first lines

    The head command shows the first lines of a file.
  2. Step 2: Use the correct syntax for 15 lines

    head -n 15 report.txt correctly shows the first 15 lines.
  3. Final Answer:

    head -n 15 report.txt -> Option A
  4. Quick Check:

    First 15 lines = head -n 15 [OK]
Quick Trick: Use head -n number to show first lines [OK]
Common Mistakes:
  • Using tail instead of head
  • Omitting -n option
  • Using incorrect option syntax

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes