Multiple choice technology testing

How do you print the first 15 lines of all files ending by ".txt" in UNIX?

  1. print 15 .txt

  2. cat *.txt -length=15

  3. head -15 *.txt

  4. tail -15 *.txt

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

The head command displays the first lines of a file. head -15 *.txt shows the first 15 lines of all files ending in .txt. tail shows the END of files, and the other options are not valid UNIX commands.