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

There are differences between tail -F and tail -f.

tail -f will continue reading a file for as long as possible, but if that file is renamed underneath it, then tail won't know and you will be wondering why you don't see anymore log lines being output to your terminal.

tail -F checks to see that the file we opened is still in the same location as before, so if the file is renamed underneath us, and a new file is created in its place (think log rotation) then it will open that new file and continue outputting data to its standard out.



I wish there was a tail -f <wildchar> that follow even if new files are created that match. my systems timestamp their logs by hour, and more than once I've been confused as to why the app just "stopped" just to realize that it's five past.


I am on my phone now (and, while its heart is a Linux kernel, it doesn't have a terminal, bash or tail. Maybe if you don't expand the wildcard tail will detect new files.


no, if you give it a literal wildcard (like you would to find, for example), it just complains that it can't find the file called *.


Guess if you really want it, you could submit a patch (or roll out your own fork)

http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/tail...

Doesn't look very bad, but I am known for being an optimist.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: