GNU/Linux Command – TAIL

tail – Output the last part of files.

Summary :
Print the last 10 lines of each FILE to stdout. With more than one FILE, precede each with a header giving the file name.

Examples :
$ tail myfile -- Show only the last 10 Lines. $ tail f1 f2 -- Show the last 10 lines from 2 files withsmall header. $ tail -vn 6 myfile -- Show only last 6 Lines with header. $ tail -c 24 myfile -- Show only last 24 Bytes. $ tail -q myfile -- Don't show headers. $ tail --retry myfile -- Keep retrying to open myfile. $ tail -f maillog -- Output appended data as the file grows.Useful to monitor logs. $ tail -f -s 10 maillog -- Once in every 10s update the output. $ tail -f --pid=600 myfile -- Terminate tail after the processwith PID 600 dies.
Read : man tail

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: