DIY & Music & Guitar & Beer & Tech

Useful short commands for viewing/editing files on Linux

A colleague of mine shared couple of shortcuts with me today that I felt are so good, that it has to be logged here. When viewing file with less command press shift + f to follow the file (almost like tail -f), it will print out all the new lines (if it’s a log file for instance) and ctrl + c will ‘exit’ back to less. In ‘less view’ press v and less will switch to nano for a quick edit. In same manner ctrl + x will ‘exit’ back to less.

p.s. I normally use Ubuntu Linux, but this shouldn’t matter anyway.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.