3 ms·
> tail -f (or even better, less +F), While “less +F” is useful, it will also eat all of your memory if left running.
by teddyh 4y ago
> tail -f (or even better, less +F),
While “less +F” is useful, it will also eat all of your memory if left running.
- Calzifer 4y agoThe less variant is good if you only want to follow for a short time or check for new output once since it can be enabled/disabled in less itself with 'F' and Ctrl+c and then you can again scroll and search in less. And regards tail. I think most users want tail -F instead of tail -f in most cases. Lowercase f follows the file descriptor while uppercase F follows the file name. So with -f you can still follow a file if it is moved or deleted (but I can't imagine many cases where you want to follow a deleted file and someone continues writing to the deleted file). With -F you can follow a file which does not exist yet (and will start following when it's created) or when a logfile is rotated continue following the new logfile.