linux poison RSS
linux poison Email

Head and Tail example

1. Suppose I need to read last 10 lines of a file
# tail -n 20 /var/log/boot.log

2. Suppose I need to read forst 10 lines of a file
# head -n 30 /etc/sensors.conf

Now imagine you want to follow what is been written “live” to the /var/log/messages file

# tail -f /var/log/messages


0 comments:

Post a Comment

Related Posts with Thumbnails