Multiple choice technology operating systems

How to display first 10 lines of all files ending with ".txt"?

  1. cat *.txt -length=10

  2. disp 10 .txt

  3. head -10 *.txt

  4. print 10 *.txt

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

The head -10 command displays the first 10 lines of files. The *.txt glob pattern matches all files ending with .txt in the current directory. Combining them as head -10 *.txt correctly displays the first 10 lines of each .txt file. Options A, B, and D use nonexistent or incorrect command syntax.