mirror of
https://github.com/uutils/coreutils.git
synced 2025-12-23 08:47:37 +00:00
Makes `parse_size` return a `Result` where the `Err` part indicates whether there was a parsing error, or the parse size is too big to store. Also makes the value parsed a `u64` rather than a `usize`. Adds unit tests for `parse_size` and integration tests using the suffix multiplier in a number passed with the `-n` flag. |
||
|---|---|---|
| .. | ||
| Cargo.toml | ||
| main.rs | ||
| README.md | ||
| tail.rs | ||
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.--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 follow‐ing 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
-fand input is regular file. Read in chunks from the end going backwards, reading each individual chunk forward.