Do you have less and more ?

$ more sent

more is basically filter to print as many lines that could be fit on screen. It is early Unix age command and can be found on Unix like operating system. With more command you can only move foreword in file but newer implementations has added backward scrolling. At bottom left corner you will find "–more–(%19)" which indicates percentage of file scanned. You can use SPACE to move foreword by screen size and ENTER to move by one line. If your implementation supports backward scrolling then pressing b will scroll backward by screen size. Note that if you use more with large files it might be slow because it reads whole file before starting.

$ less sent postponed

less provides more functionality than more although name is misleading.😉 less is faster with large files as it doesn’t require whole file to read before starting. You can use Pg Up and Pg Dn buttons on keyboard to move backward and foreword which not a case with more. Commands of less are based on more and vim. You can use pattern matching, moving to nth line, etc. With less command you will get ":" at bottom left corner where you can type your commands. One of the good features of less is to move backward or forward with any arbitrary number of lines.

See man page for interesting features of more and less


Enjoy!

Post a Comment

You must be logged in to post a comment.
%d bloggers like this: