brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: less +F follows a file like tail -f and lets you scroll back

Less
~/tips/less-follow

less +F /var/log/syslog

Follows a growing log file, and lets you stop and scroll back through it.

tail -f is fine until something scrolls past and you want to look at it again. less can follow a file too, and keeps the history within reach.

less +F /var/log/syslog

It starts in follow mode and new lines appear at the bottom. Press Ctrl-C to stop following and scroll or search like in any less session. Press F to follow again, and q to leave.

Caveat: when a log gets rotated, less keeps following the old file. Reopen it, or use tail -F for that situation.

Further reading: less

More Less tips less -i /var/log/syslog All Less tips (2) All topics

Link