To my surprise I have found that there are still people out there who use “more”, this has shocked me.
So this is a very, very short blog post to tell those who visit that less is more and more is less.
less is a command that comes as standard in almost all Linux distros now, and unlike more it actually has the ability to do backwards and forwards scrolling with Page Up, Page Down, arrow keys and spacebar. It’s a fantastic little command!
Very simple to use and an all round great tool. The best thing about less is it doesn’t need to read the whole file in one go, it reads in chunks. Opening a 100MB log file is simple with less!
|Highlights just the current match of any searched string,
|Show a more detailed prompt, including file position,
|Show line numbers.
|Follow (like tail -f)
Useful key bindings
|Search e.g. /test
|Goto next search match
|N (Shift + n)
|Goto previous search match
|Goto start of the file
|Goto end of the file