How can I tail -f
a file that over the network, say at \\192.168.2.130\public\print.log
?
I have tried the variations of the following:
tail -f //192.168.2.130/Southpaw/Tactic/print.log
which erred sayingtail: cannot open `//192.168.2.130/Southpaw/Tactic/print.log' for reading: No such file or directory
- Mounted the path using the
mount -t cifs
and then triedtail -f
but that isn't working either, meaning it doesn't output the updates that are made to the file.
Best Answer
Keep trying with mounted cifs. And just use tail with following parameter:
Like this, tail follows the file name not the decriptor, and combined with
--retry
it tries again even if the file is inaccessible for some time.