How do you display the top 5 lines in Unix?

Danh Trịnh

New member
How do you display the top 5 lines in Unix?
Answer
head -15 /etc/passwd
To look at the last few lines of a file, use the
tail command
. tail works the same way as head: type tail and the filename to see the last 10 lines of that file, or type tail -number filename to see the last number lines of the file. Try using tail to look at the last five lines of your .
 

Tìm kiếm

Back
Top