How to display first 10 lines of all files ending with ".txt"?
-
cat *.txt -length=10
-
disp 10 .txt
-
head -10 *.txt
-
print 10 *.txt
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.