How do I display the bottom part of a file?
-
To display the bottom part of a file do:
$ tail /var/adm/messages
To display the last 20 lines of a file do:
$ tail -20 /var/adm/messages
You can use the tail and head commands with any unix command which lists lines to the screen, like this ls -l listing
$ ls -l | tail -5 or $ tail -10 /etc/services > /var/tmp/services.out
© Lightnetics 2024