tail -f
will update the file once new data is inserted , but if the whole file is being rewritten it will give an error .
is there any other option to keep reloading the whole file ?
Thank you
tail -f
will update the file once new data is inserted , but if the whole file is being rewritten it will give an error .
is there any other option to keep reloading the whole file ?
Thank you
man tail
gives :tail -F
ortail --follow=name --retry
to keep tail watching file even if all the file is rewritten.Have a look at multitail. The following output was produced through the command
sudo multitail --follow-all -i /vor/log/syslog
. It shows the end of one file, a notice that the file got truncated and the beginning of the new syslog entry: