Blog Search
Latest Posts
New SEO and Link Building Services
Firefox 3 Web Browser Launched
New Educational Media Website Launch
Trevor Laurency Fitness Website Launch
Recent Recommended Links - April 2008
Web Apps on Your Desktop with Mozilla Prism
Recent Recommended Links - March 2008
Ubuntu Linux - Persistent sudo root
Controlling PHP Register Globals Using .htaccess File
Javascript Essentials - Date Pickers (Calendars)
Blog Archive
Browse by Subject
AJAX
Apache
CMS
CSS
HTML
Java
JavaScript
Links
Linux
Mac
MySQL
Pascal
PHP
postgreSQL
RSS
Ruby
SEO
Web Dev News
Windows
XML
Other Resources
Computer Science Student Articles
Unix: Pipe Less Command (Linux, Mac OS)
Published: 6th Nov 2006
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.txtThis 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 | lessThe "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.
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)


