CynthiaZCar
asked on
Does Tail.exe lock the files it reads?
We are having an issue with log files not updating. One of the guys is using Tail.exe from Microsoft to read a specified number of lines from the bottom of the log file. Since I don't have the code behind the tail.exe, it's difficult to know how file locking may be affecting updating the log files.
How does tail.exe work with file locking? If tail.exe is called multiple times for the same log file, would that keep the log file from updating because it's locked? Thanks!
How does tail.exe work with file locking? If tail.exe is called multiple times for the same log file, would that keep the log file from updating because it's locked? Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Then I'd rather go for 'tail -f' instead of looping...
ASKER
Thank you for your quick response to my question.
The correct answer to this question is, "Yes". Tail.exe does in fact place at least a partial lock on the file. For proof, try tail -f mylog.log and then try to delete or rename the log file. You will get an error that the file is being used by another person or process.
ASKER