delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/10/16/12:03:43

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=N3HRD1c+VL4A96qK
a1wYPkSNPID/Qg7uvpZRq9DKAeLk60QZ7RtMIua5+vRP/0/UVC2Hj5CF/VDGPzAr
pyocGqZC3R0F+bakBqn+3SKHrgwQvidxcQyxznuvyxqjLXxHZXK/op2UlcspUyKs
b4/etrp/ZL8bOA8xbL1nmxKtpN0=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=3cd9TGKeY/tUxmz++D5s28
kwnFI=; b=wilFcW+5B6+00kWlM8W5ExSO1Eqz1m28pn50cbDOncCEFMm3eAXJlx
R+KZKCNNGahMa1FQTplY8YekQayu3zZMgfFfJ/DRvAeIalWr9QAeO8x8gYu27l9/
XlGadbeWbjqOWz/jWx1Dy8hFijrYtK1AmJz18ia2wtdMYQCYYWayw=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=BAYES_40,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*F:D*mail.com, doe, H*Ad:D*mail.com
X-HELO: mout.gmx.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mail.com; s=dbd5af2cbaf7; t=1539705807; bh=Ay1Pwjla/3ih31vCHWceg0yQRNjcRLHC3+sGcxi4FMU=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=n0dH2llf1jTvz4qztIy/8lkpd+8z6yJcuPJ73Jp5lETiXYc2y9TxfM3LYAa0ym12Z 1bLWcF80nTapIaAmfnWm7J/P+nJWJAe2jKHzAV+wtkXU5LLY1Xt9FdJB1wMaJAlpm+ /vzNeCAH0BuQbw9RcQdniAa2nWQKRMunu5t7ZziY=
X-UI-Sender-Class: 214d933f-fd2f-45c7-a636-f5d79ae31a79
Subject: Re: Is who -b command available? Need to know when computer was started.
To: cygwin AT cygwin DOT com
References: <014001d46565$feedda10$fcc98e30$@yahoo.com>
From: john doe <johndoe65534 AT mail DOT com>
Message-ID: <f4d8aa23-fb6b-b196-d3c9-6c191608dee8@mail.com>
Date: Tue, 16 Oct 2018 18:03:27 +0200
MIME-Version: 1.0
In-Reply-To: <014001d46565$feedda10$fcc98e30$@yahoo.com>
X-IsSubscribed: yes

On 10/16/2018 5:36 PM, 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).
> 

If you have 'SystemInfo' you could try:

$ cmd.exe /C "SystemInfo /FO list" | grep 'System Boot Time'

-- 
John Doe

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019