Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Why is tail unix command not working properly on a mounted drive?

I mounted a remote drive on my mac, smb://some-windows-host/some-folder.


I thought I'd be able to do a 'tail -f' on a file on this mounted drive, but it seems the changes aren't coming through. What's wrong?


Do I have to enable someting?


Thank you so much.


JS.

MacBook Pro, Mac OS X (10.7)

Posted on Nov 8, 2011 12:33 PM

Reply
Question marked as Best reply

Posted on Feb 20, 2014 10:25 AM

Kind of late, but for anyone that sees this in the future.


It's possible that the process that is modifying your file is creating a new file with the same filename. The 'tail -f' command reads the file based on it's 'file descriptor'. When the file gets rewritten by the other process, then the file descriptor changes.


So to track a file by it's name instead of it's descriptor, you should use a capital 'F', like 'tail -F'.

1 reply
Question marked as Best reply

Feb 20, 2014 10:25 AM in response to jsbournival

Kind of late, but for anyone that sees this in the future.


It's possible that the process that is modifying your file is creating a new file with the same filename. The 'tail -f' command reads the file based on it's 'file descriptor'. When the file gets rewritten by the other process, then the file descriptor changes.


So to track a file by it's name instead of it's descriptor, you should use a capital 'F', like 'tail -F'.

Why is tail unix command not working properly on a mounted drive?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.