Change formula from: "Used/Size * 100" to "Used/(Used + Avail) * 100".
This formula also works if "Used" and "Avail" do not add up to "Size",
which is the case if there are reserved disk blocks.
Change formula from: "Used/Size * 100" to "Used/(Used + Avail) * 100".
This formula also works if "Used" and "Avail" do not add up to "Size",
which is the case if there are reserved disk blocks.
Previously, individual file sizes were used to compute the number width, which
would cause misalignment when the total has a greater number of digits, and is
different from the behavior of GNU wc
```
$ ./target/debug/wc -w -l -m -c -L deny.toml GNUmakefile
95 422 3110 3110 85 deny.toml
349 865 6996 6996 196 GNUmakefile
444 1287 10106 10106 196 total
$ wc -w -l -m -c -L deny.toml GNUmakefile
95 422 3110 3110 85 deny.toml
349 865 6996 6996 196 GNUmakefile
444 1287 10106 10106 196 total
```
"df --output ." was treated as "df --output=." and hence "." was
interpreted as a column name. With this commit, "." is treated as
an argument on its own.
Fixes#3324
Print a usage error when duplicat column names are specified to the
`--output` command-line argument. For example,
$ df --output=source,source
df: option --output: field ‘source’ used more than once
Try 'df --help' for more information.
Implement the "File" column in the `df` output table. Before this
commit, a blank entry appeared in the "File" column for each
row. After this commit, a "-" entry appears when `df` is run with no
positional arguments and the filename appears when run with positional
arguments. For example:
$ touch a b c && df --output=target,file a b c
Mounted on File
/ a
/ b
/ c
Produce a usage error on an invalid signal argument. For example,
$ timeout --signal=invalid 1 sleep 0
timeout: 'invalid': invalid signal
Try 'timeout --help' for more information.
Return an error when a negative interval is provided as the argument
to `uucore::parse_time::from_str()`, since a `Duration` should only be
non-negative.
Fix a bug in the behavior of `split -e -n NUM` when the input file is
empty. Previously, it would panic due to overflow when subtracting 1
from 0. After this change, it will terminate successfully and produce
no output chunks.
Use `Duration::saturating_mul()` to avoid a panic due to overflow in
`uucore::parse_time::from_str()`. This change prevents panic on very
large arguments to timeout and sleep.