Tuesday, June 12, 2012

head / tail


head and tail command displays the upper and bottom of a file.
head -n 10 /var/log/messages #displays top 10 rows of messages
head -n 10 /var/log/messages /var/log/secure #displays the top 10 rows of messages and secure
tail -n 10 #displays the same thing as head but the bottom part of the filename

No comments:

Post a Comment