Web Design, Development & Marketing

Web Development Articles

Unix: Pipe Less Command (Linux, Mac OS)

A handy little UNIX command which can be used to make huge lengths of information readable in the terminal is the "pipe less" command.

Say, for exampe, you want to view the contents of a long text file in the terminal. At the command line you may type:

cat file.txt

This will simple print out the whole file and you will only be able to see the last section of the file which appears on your screen. By typing the following you can view a single section of the file at a time.

cat file.txt | less

The "pipe" symbol can typically be gained by hitting SHIFT-BACKSLASH. You can navigate the whole file by pressing PAGEUP and PAGEDOWN to scroll between sections. Typing "q" exits the viewing mode and gives you back the command line prompt.

Subscribe to RSS Feed Bookmark and Share

Related Links

Related Articles / Posts

Firefox 3 Web Browser Launched (18/06/2008)

Recent Recommended Links - April 2008 (11/04/2008)

Recent Recommended Links - March 2008 (16/03/2008)

Ubuntu Linux - Persistent sudo root (16/03/2008)

Controlling PHP Register Globals Using .htaccess File (04/03/2008)