This is the first blog in a new series that I have wanted to start for a while. The series will be called WILT which stands for What I Learnt Today. In our day to day life, especially at work, we all learn something or at least aspire to learn something. In this series of short blogs, I will share some interesting topics that I come across in my workplace.
The topic for today is the “less” command in Linux. While I have seen some of my colleagues use the “less” command, I have always been used to the more command. Out of curiosity, I tried out the commands and found that less is more powerful than more. Much more powerful. Here are some cool things I observed:
- It can load large files much easily when compared to more.
- All the capabilities of more are available, plus you can use VI syntax to do search and navigate
- Do “less tgz_file” and less will show you the list of files inside the zip file - thanks to a colleague of mine
- Do ”less RPM_file” and less will show you the contents of the RPM file - the changelog and list of the all the files.
- On Macbook PRO both binaries point to the same thing. Even man more shows the information about less. This is a great idea from OSX team - since less is better than more.
I am sure there are several other interesting usages of the less command. If you have something to share, leave a comment.