Unix - Tail Utility would open the file or not

48 views Asked by At

Can anybody help me to sort this out. What is the logic of Tail -f utility in Unix. Is it open the log file to check the updated content or is there any other way to get this information. All the implimentation of Tail utility says that it will open the fileenter link description here

1

There are 1 answers

0
hhsecond On BEST ANSWER

As per the source code of tail utility, it is opening the file in read mode not in write mode. So the answer is, I would say TAIL is opening the file for checks. But along with that i would like to answer one more question, since it is opening in read mode the other process that tries to open the same file will not face any issues.