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
  • 66,199
  • 35
  • 114
  • 250
veccy
  • 133
  • 4

3 Answers3

7

Functionally equivalents to tail -f are

less +F

and where available

tailf
enzotib
  • 50,671
  • 14
  • 120
  • 105
  • Thanks for telling about `less +F`. Seems very helpful when used with `screen`. – rozcietrzewiacz Sep 30 '11 at 22:18
  • thank, those are the same results however delay remains. My resolution seems to be to remove nfs – veccy Sep 30 '11 at 22:37
  • Also worth mentioning how to stop and start the following - [this answer](http://unix.stackexchange.com/questions/81628/is-there-an-alternative-to-tail-f-that-has-convenient-scrolling#81630) sums it up well. – Steve Chambers Apr 07 '17 at 14:53
  • According to https://bugs.archlinux.org/task/52159 `tailf` is deprecated on arch? – user202729 Oct 19 '21 at 15:55
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,452
  • 19
  • 29
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
lainatnavi
  • 119
  • 5