www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
In-Reply-To: | <5.2.0.9.1.20090130164221.01ec8dd0@localhost> |
References: | <loom DOT 20090130T125737-221 AT post DOT gmane DOT org> <4982FB77 DOT 7020505 AT byu DOT net> <loom DOT 20090130T152913-409 AT post DOT gmane DOT org> <5 DOT 2 DOT 0 DOT 9 DOT 1 DOT 20090130164221 DOT 01ec8dd0 AT localhost> |
Date: | Fri, 30 Jan 2009 10:57:50 -0500 |
Message-ID: | <f60fe000901300757l23e6466bu4250f71c8593013d@mail.gmail.com> |
Subject: | Re: Finding either boot time or login time |
From: | "Mark J. Reed" <markjreed AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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 |
One-liner to display the boot time: $ perl -lane 'print ~~localtime(time-$F[0])' /proc/uptime Or format it however you want, e.g. for ISO8601: $ perl -MPOSIX -lane 'print strftime("%FT%T", localtime(time-$F[0]))' /proc/uptime -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |