Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Login time

by lidden (Curate)
on Apr 15, 2007 at 23:53 UTC ( [id://610242] : note . print w/replies, xml ) Need Help??


in reply to Login time

Using the module suggested by derby.
perl -M"User::Utmp':constants',':utmpx'" -wle '$t=time;print $_->{ut_u +ser}, " : ", ($t-$_->{ut_tv}{tv_sec})/3600/24, " days." for getutx'