Is there a command to output a large file and follow on directly in the shell stdout?
I am aware of less +F
or I could simply use tail
with an ultimately high n
like tail -f -n1000000
if the file is already big, when I call tail
but I was wondering if there is a proper way to handle this.
less
is not handy in my situation because the files I handle contain carriage returns and the like, which less
displays instead of moving the cursor. cat
heads the CR
but does not follow and tail -f
does not give me the whole picture... basically I guess I am looking for cat -f <single-file>
tail -f
doesn't truncate output, it will just keep displaying whatever has come so far while still displaying what was there earlier in the terminal. How would yourcat -f
handle multiple files?tail -n +1 -f file
). That will print the full file and will keep following it, regardless of how big it is. I guess I'm not getting how this is different from what your question is asking for.-nx
and-n +x
. Terribly sorry. Would love to accept your answer as solution if you follow up on your comment. Or mark as duplicate if I found a matching question. Open to suggestions :-)