I need to display whole file before tracking it for a new changes, not only the last 10 lines (yep, I know it's not tail conceptually). In other words, something like cat -f
would do, if it would ever existed. Tail's man doesn't give me any ideas. The only option I see right now is to somehow combine cat all but last 10 lines and tail -f output.
Any hints, please?
cat $f && tail -n0 -f $f
comes to mind, and checking the man page it looks liketail -c0 -f $f
might also do what you want (and be better because it does not create a race condition between the two processes where data written could be ignored). I don't have access to a Linux system right now but do either of those do what you want? – user Jun 03 '13 at 08:47