coreutils/tail
Michael Gehring 30bba07f9c always build multicall binary
squashed:
	a2c6b27 - build: automatically generate main() files
	c942f0f - remove MULTICALL=1 build from travis
	cb7b35b - make: remove unnecessary shell command
	69bbb31 - update README
	03a3168 - all: move main() into separate file that links against util crate
	8276384 - make: always build multicall binary
	aa4edeb - make: avoid 'rustc --crate-file-name'
2014-06-26 10:26:16 +02:00
..
README.md Rudamentary tail implementation. 2014-06-12 23:29:50 +02:00
tail.rs always build multicall binary 2014-06-26 10:26:16 +02:00

Rudamentary tail implementation.

##Missing features:

Flags with features

  • --bytes : output the last K bytes; alternatively, use -c +K to output bytes starting with the Kth of each file
  • --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.
  • --pid : with -f, terminate after process ID, PID dies
  • --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
  • --verbose : always output headers giving file names

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.