Monday, October 31, 2011

Tail command & Head command in Linux

#tail -n 100 /var/log/dmesg | more

The above example would list the last 100 lines in the file /var/log/dmesg

#head -n 100 /var/log/dmesg | more

The above example would list the first 100 lines in the file /var/log/dmesg

0 comments:

Post a Comment