I would like a tail -f
type of behavior that reads the entire file and then continues to follow it as it's written to.
SOLUTION
Based on the answer I accepted, this works: tail -f -n +1 {filename}
Why it works: The -f
option continues to "follow" the file and output new lines as they are written to the file. The -n +1
instructs tail
to start reading the file from the first line. Using -n -10
would start with the last ten lines of the file.
tail -f -n 10000000000000000000
probably will show all the lines would it not? (maybe the 10000000000000000000 is a bit much :=) )more fileName
would do just thattail -f -n 100...
will involve pre-reading the file to determine the number of lines, unless it's smart enough to work out an upper bound for the line count based on the file size.