O'Reilly logo

SAMS Teach Yourself Unix in 10 Minutes by Robert Shimonski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The tail Command

The tail command is simple to remember. If you want to see the tail end of a file, use the tail command. If you want to see the top, use the head command. Now that you know the simplicity in remembering them, let's look at what each does starting with tail.

The tail command is powerful, quick, and simple to use. If you want to see the bottom 10 lines of a file, then you may want to just specify the tail command and the file you want to view the inside of.

>tail hosts.allow

Or

>tail –20 hosts.allow

The output of this command starts from the bottom up and displays (by default) 10 lines from the bottom up. If you specify the amount of lines you want to see, count the amount of lines from the bottom up and that is what you will ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required