Skip to content

Comment on Linux Commands for Developers

Comments

tail -f filename should definitely make the list, essential for watching what's appended to log files in real time.

I prefer:-

tail -F filename

as most of the logfiles I need to watch tend to wrap at some point and 'tail -f' doesn't check for inode changes.

(-F is a non-standard option, it's there on GNU's [EDIT] tail binary and OS-X but not Solaris for example).

Thanks, very useful - didn't know that!

less +F filename does the same thing, but loses the following when the logfile gets rotated. Does the same thing happen to tail -f? (edit: alexfoo answered that tail -F tracks the file properly)

one benefit to less +F is that you can cancel the following and read normally in less.

> one benefit to less +F is that you can cancel the following and read normally in less.

Yeah, including doing backwards and forward searches, that is very handy

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.