In the documentation for logstash, they mention the command tail -0aI have never heard of the -a flag and I can't find any information on google, tail --help or the man pages. What is the difference between tail -0a foo.bar and tail foo.barUpdate After testing this further, I wonder if it is a typo. Neither command works on my mac. [root@interactive adaptive]# tail -0a /var/log/messagestail: option used in invalid context -- 0[root@interactive adaptive]# tail -a0 /var/log/messagestail: invalid option -- 'a'
What does tail -0a do?
man;tail
tail -0 is a historical, deprecated way of writing tail -n 0, i.e. print the last 0 lines of the file. (So tail -0 doesn't produce any output.)I don't know of any tail implementation that has a -a option. From context, it looks like -f was meant. tail -f makes tail keep the file open when it reaches the end, and keep watching forever in case some other program appends more data at the end of the file, and prints this appended data as it comes. So tail -0f starts at the current end of the file, and prints any data that is subsequently appended to the file.