Skip to content

uptime: should accept a filename as argument #6393

@cakebaker

Description

@cakebaker

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions