Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> tail -f (or even better, less +F),

While “less +F” is useful, it will also eat all of your memory if left running.



The 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: