Tag: less

Following log files and other output

In many situations, especially when testing, I like to see the log file content (or other system output) on one of my open command line windows.

Most of the time

tail -f <log-file-name>

is just fine. However, sometimes I like to have more control of what displayed. In these cases, I use less (https://en.wikipedia.org/wiki/Less_(Unix)):

less -F <log-file-name>

is more convenient (and powerful): I can navigate the whole file, search for specific content.

Note, that while tail uses a lower-case ‘f’ to follow the file as it’s being written to, less uses an uppercase ‘F’.


%d bloggers like this: