This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: EXTERNAL: Re: Is who -b command available? Need to know when computer was started.


On 10/16/18 12:57 PM, Gary Johnson wrote:
> On 2018-10-16, Peder Sverdrup via cygwin wrote:
>> Hi,
>>
>> I am making a script and need to know when the computer was last booted.
>> This can be done with
>>
>> who -b command. I have installed the minimum cygwin and this command is not
>> available.
>>
>> Which package do I need to install in order to have this command available
>> (or any other command
>>
>> that can tell when the computer was last booted).
> The procps-ng package provides the uptime command which will tell
> you how long it has been since the computer was last booted.
>
> Regards,
> Gary

FWIW
on my cygwin, 2.11.0(0.329/5/3), I have who (GNU coreutils) 8.26.
Of all the options -a/--all gives:
$ who --all
roger    - pty1         2018-10-16 13:05   .           276 (10.40.90.15)
-u, -H, -m, -s, -u gives the same (plus/minus a '-' or '.')
-q seems reasonable, at least similar to the same command on fedora
--version, --help give expected output.
The rest return nothing, including -b


>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>
>

-- 
Roger Wells, P.E.
leidos
221 Third St
Newport, RI 02840
401-847-4210 (voice)
401-849-1585 (fax)
roger.k.wells@leidos.com


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]