less Tips and Tricks

The less tool can open multiple files in order, I find this useful when comparing sets of logs. For instance

user@host $ less node*/logs/special_log.txt

Which will open the first file it finds and hold the rest in reserve, switching forward and backwards through this list can be done with the :n and :N commands, and of course if you need to display the file name :f will do the trick.

Leave a Reply

Your email address will not be published. Required fields are marked *