coreutils/src/uu/tail
Jan Scheer f8e96150f8 fix clippy warnings and spelling
* add some missing LICENSE headers
2021-06-04 15:39:34 +02:00
..
src fix clippy warnings and spelling 2021-06-04 15:39:34 +02:00
Cargo.toml head: add abstractions for "all but last n lines" 2021-05-22 23:56:48 -04:00
README.md docs/tail ~ fix markdownlint complaints 2021-05-31 08:23:58 -05: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 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.