coreutils/src/tail
2017-12-08 15:05:07 -08:00
..
platform tail: implement --pid. Closes #846. 2016-12-22 01:32:09 +03:00
Cargo.toml Handle SIGPIPE correctly and autogenerate main() for each util 2017-12-08 15:05:07 -08:00
README.md tail: implement --pid. Closes #846. 2016-12-22 01:32:09 +03:00
tail.rs tail: suppress headers when --quiet flag is used 2017-10-05 21:25:21 +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.
  • --quiet : never output headers giving file names
  • --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.