Kangry.com [insert cool graphic here]
home | Topics | Logout | Search | Contact | ?? Kangry ?? | Bandwitdh
Topics:
DVR
nvrec
Mplayer
Links
Misc
Commands
Humor

Name

Password

New user

uploaded files
(linux_command_line)-> (Parent)->display last 20 lines of a file linux submited by Russell Mon 19 Dec 05
Edited Mon 30 Jan 06
Web kangry.com
To display last 20 lines of a file linux use the tail command.
$ tail -20 bigfile.txt
Displays the last 20 lines. The default is 10 if you leave out the -n option.
Other useful options:
$ tail -c 100 bigfile.txt 
Displays the last 100 bytes of the file ( without reguard for the lines). This can be used on binary files if you know what you are doing.

The head command is the same as tail except that it operates on the begining of the file.

To get lines out of the middle of the file you can use them together:
cat bigfile.txt |head -10|tail -2
extracts lines 9 and 10 only.

This post is in responce to a hit from this search


Add comment or question...:
Subject:
Submited by: NOT email address. Leave blank for anonymous    (Spam Policy)

Enter Text: (text must match image for posting)




This file (the script that presented the data, not the data itself) , last modified Wednesday 03rd of December 2014 09:40:39 AM
your client: CCBot/2.0 (http://commoncrawl.org/faq/)
current time: Sunday 22nd of October 2017 07:37:10 AM