coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

uptime: should accept a filename as argument

Open cakebaker opened this issue 1 year ago • 2 comments

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).

cakebaker avatar May 11 '24 05:05 cakebaker

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 avatar May 12 '24 09:05 AnirbanHalder654322

@AnirbanHalder654322 sure, go ahead :)

cakebaker avatar May 12 '24 09:05 cakebaker