Multiple choice technology

Which of the following is the illegal command?

  1. head +17 File.dat

  2. head -17 File.dat

  3. tail +17 File.dat

  4. tail -17 File.dat

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

The head command with a numeric argument requires a negative sign to specify the number of lines. Option B (head -17) correctly shows the first 17 lines, while option A uses +17 which is invalid syntax. Options C and D show tail command syntax, which does support + for counting from line N.