From the tail(1) man page: With --follow (-f), tail defaults to following the file descriptor, which means that even if a tail’ed file is renamed, tail will continue to track its end. This default behavior is not desirable when you really want to track the actual name of the file, not the file descrip- tor (e.g., log rotation). Use --follow=name in that case.

Understanding the Context

That causes tail to track the ... Is it possible to do a tail -f (or similar) on a file, and grep it at the same time? I wouldn't mind other commands just looking for that kind of behavior. shell - grep and tail -f?

Key Insights

- Unix & Linux Stack Exchange Say I have a huge text file (>2GB) and I just want to cat the lines X to Y (e.g. 57890000 to 57890010). From what I understand I can do this by piping head into tail or viceversa, i.e. head -A /... tail - cat line X to line Y on a huge file - Unix & Linux Stack Exchange When I do tail -f filename, how to quit the mode without use Ctrl+c to kill the process?

Final Thoughts

What I want is a normal way to quit, like q in top. I am just curious about the question, because I feel ... A simple pipe to tail -n 200 should suffice. Example Sample data. $ touch $(seq 300) Now the last 200: $ ls -l | tail -n 200 You might not like the way the results are presented in that list of 200. For that you can control the order of the results that ls outputs through a variety of switches.

For example, the data I've generated is numeric. Show tail of files in a directory? - Unix & Linux Stack Exchange