-2

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

Community
  • 1
  • 1
hhsecond
  • 62
  • 7
  • You could find out with the strace utility. "strace tail -f someFile" and see what it's up to. – donjuedo Jun 09 '15 at 16:16
  • 2
    Or just download the source code and look... – twalberg Jun 09 '15 at 16:35
  • silly me.. Thanks twalberg.... i just went through the scritp superficially...it seems like the utility is opening the file for checks. Will post the answer after completing the analysis. (for the folks who are getting stucked with same issue) – hhsecond Jun 10 '15 at 14:01

1 Answers1

0

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.

hhsecond
  • 62
  • 7