Linux Tail Command
My colleague had to follow a log file using the tail. The file was updating at a very fast rate and was getting rotated frequently. He was having problem keeping track of changes as tail tries to keep on reading the same file even if the filename has been changed. We looked at the man page and found out '--follow' option. To use it give the command :
tail --follow=name 'file name'
Using this option, tail follows the filename. So I the file gets rotated tail starts to follow the new file of the same name.
tail --follow=name
Using this option, tail follows the filename. So I the file gets rotated tail starts to follow the new file of the same name.
Comments