coreutils/src/tail
2019-05-12 22:42:20 -07:00
..
platform Port 'tail' to Redox 2018-03-18 22:00:00 -07:00
Cargo.toml Split off uucore into its own repository 2019-05-12 22:42:20 -07:00
README.md tail: squashed two commits 2018-01-06 16:49:23 +03:00
tail.rs Fix more clippy warnings and remove redundant 'static 2018-09-04 14:33:36 +02:00

Rudimentary tail implementation.

Missing features:

Flags with features

  • --max-unchanged-stats : with --follow=name, reopen a FILE which has not changed size after N (default 5) iterations to see if it has been unlinked or renamed (this is the usual case of rotated log files). With inotify, this option is rarely useful.
  • --retry : keep trying to open a file even when it is or becomes inaccessible; useful when following by name, i.e., with --follow=name

Others

The current implementation does not handle - as an alias for stdin.

Possible optimizations:

  • Don't read the whole file if not using -f and input is regular file. Read in chunks from the end going backwards, reading each individual chunk forward.