Which command will print the last line of a file in Unix?

Nguyễn Hào

New member
Which command will print the last line of a file in Unix?
Answer
Tail is a command which prints the last few number of lines (10 lines by default) of a certain file, then terminates. Example 1: By default “tail” prints the last 10 lines of a file, then exits. as you can see, this prints the last 10 lines of /var/log/messages.
 

Tìm kiếm

Back
Top