The less command

Posted by annamese on Jul 4, 2012 8:24 PM
By Linux and Life
Mail this story
Web version

The "cat" command is one of the most popular linux commands. It is used to display a file in the terminal. However, one problem is that when using "cat" to read a big file, it will display the whole file in the terminal so you will have to scroll up a huge wall of text to read the file. The "less" command is somewhat similar to "cat", it is also used to read a file but "less" displays only a part of the file instead of the whole file. To read files with "less", you just need to scroll up and down. The real advantage of "less" is that because it doesnt read the entire file so with very huge files, "less" will start faster than "cat" or any text editor like vi.

Full Story

Printed at http://lxer.com/module/newswire/view/169824/index.html