coreutils/src/uu/tail
2022-01-16 17:05:48 +01:00
..
src tail use UResult 2021-11-21 12:37:56 +08:00
Cargo.toml coreutils 0.0.8 => 0.0.9, uucore_procs 0.0.7 => 0.0.8, uucore 0.0.10 => 0.0.11 2022-01-16 17:05:48 +01:00
README.md tail: handle - as an alias for stdin 2021-08-01 17:20:24 -04:00

Notes / ToDO

  • 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 doesn't follow stdin in non-unix platforms

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.