Text filters · Question 9 of 12

Which command prints a file from line 5 to the end?

1 answer is correct. Medium Created with AI

Show answer

Answer

  • D tail -n +5 file.txt

Explanation

The plus sign means “from line 5 on”. tail -n 5 returns the last five lines, head -n -5 everything except the last five.

Certifications & exams

Which exam comes next?

You can already practise for 51 exams, and 16 are up for a vote. See all certifications with their official information, cast your vote or suggest your exam.

See all certifications