Re:Use the 'tail' command to monitor everything
by bofh23 on Wednesday July 14, 2021 @10:09AM
(#27833168)
My less(1) tips are:
Use "-S" to toggle the "--chop-long-lines" option at invocation or in interactive mode. This mode shows only one line on the screen for each line in a file and is helpful when viewing a log with entries much longer than the screen width. When lines are chopped less(1) lets you scroll horizontally with <LEFTARROW>/<RIGHTARROW>. Chopped mode also works in tail mode ("F" command or "+F" option).
As others have mentioned the search "/pattern" and filter "&pattern" commands are awesome and they also work in tail mode.
The -J option toggles the status column which is helpful when using search patterns or paging around a file.
Since less(1) has lots of features and navigation methods it’s good to remember the "h" command to show the help page.
Use "-S" to toggle the "--chop-long-lines" option at invocation or in interactive mode. This mode shows only one line on the screen for each line in a file and is helpful when viewing a log with entries much longer than the screen width. When lines are chopped less(1) lets you scroll horizontally with <LEFTARROW>/<RIGHTARROW>. Chopped mode also works in tail mode ("F" command or "+F" option).
As others have mentioned the search "/pattern" and filter "&pattern" commands are awesome and they also work in tail mode.
The -J option toggles the status column which is helpful when using search patterns or paging around a file.
Since less(1) has lots of features and navigation methods it’s good to remember the "h" command to show the help page.