public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Wells, Roger K." <ROGER.K.WELLS@leidos.com>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: Re: EXTERNAL: Re: Is who -b command available? Need to know when computer was started.
Date: Tue, 16 Oct 2018 17:34:00 -0000	[thread overview]
Message-ID: <99897D710406F142A5DE486B0F3B7BC10158CBFCA0@EMP-EXMR204.corp.leidos.com> (raw)
In-Reply-To: <20181016165745.GA1226@phoenix>

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

  reply	other threads:[~2018-10-16 17:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-16 15:36 Peder Sverdrup via cygwin
2018-10-16 16:03 ` john doe
2018-10-16 16:57 ` Gary Johnson
2018-10-16 17:34   ` Wells, Roger K. [this message]
2018-10-17  2:21   ` Brian Inglis
2018-10-16 18:54 ` cyg Simple

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=99897D710406F142A5DE486B0F3B7BC10158CBFCA0@EMP-EXMR204.corp.leidos.com \
    --to=roger.k.wells@leidos.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).