Nguyễn Thị Lan
New member
How do I get the first and last line of a file in Linux?
Answer
By default, head shows you the first 10 lines of a file. You can change this by typing head -number filename, where number is the number of lines you want to see. To look at the last few lines of a file,
use the tail command.
Answer
By default, head shows you the first 10 lines of a file. You can change this by typing head -number filename, where number is the number of lines you want to see. To look at the last few lines of a file,
use the tail command.