How to tail a file over the network

mounttail

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 saying tail: 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 tried tail -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:

tail --retry --follow=name yourfile

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.

Related Question