coreutils
coreutils copied to clipboard
uptime: should accept a filename as argument
GNU uptime allows you to specify a file, whereas uutils uptime doesn't:
$ ../gnu/src/uptime /var/log/wtmp
07:32:11 up 1:01, 995 users, load average: 0.32, 0.35, 0.34
$ cargo run --features=unix uptime /var/log/wtmp
error: unexpected argument '/var/log/wtmp' found
Usage: target/debug/coreutils uptime [OPTION]...
For more information, try '--help'.
From the docs:
If an argument is specified, it is used as the file to be read to discover how many users are logged in. If no argument is specified, a system default is used (uptime --help indicates the default setting).
The since option in uptime also seems to be deprecated, its not listed in https://www.gnu.org/software/coreutils/manual/html_node/uptime-invocation.html . I want to pick this up, if anyone is not already working on it.
@AnirbanHalder654322 sure, go ahead :)