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: Finding either boot time or login time


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/


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