2

I am seeing a delay of several seconds with the tail command. I found the cause for it has something to do with nfs services. I am using Arch linux and yet to find out how to disable all these services.

I have searched and had some indication that other tools will not be affected such as cat so what can give equivalent results to tail -f?

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
veccy
  • 133

3 Answers3

7

Functionally equivalents to tail -f are

less +F

and where available

tailf
enzotib
  • 51,661
0

The delay is likely due to buffering of the data.

tail (from the man page) checks for updates every second (changeable with '-s' or '--sleep-interval'), which can cause a perceptible delay.

tailf accesses files without causing a corresponding atime update (access time), which could introduce delays.

And less... as always, less is more!

lornix
  • 3,482
0

tail -F: same as -f with --retry. Even better than tailf since it works without re-launching the command if the file disappears. Example output:

tail: 'some-log-file.log' has become inaccessible: No such file or directory
tail: 'some-log-file.log' has appeared;  following new file