How to display time_last_login (from AIX V5.3 lsuser command) in a meaningful way
My thanks to Jens-Uwe Mager for suggesting (in a post
to comp.unix.aix
on Dec 5 2001) to use perl:
# lsuser -f pittman | grep last
time_last_login=1154555640
time_last_unsuccessful_login=1149027331
tty_last_login=/dev/pts/3
tty_last_unsuccessful_login=/dev/pts/1
host_last_login=wecm-9-67-23-63.wecm.ibm.com
host_last_unsuccessful_login=localhost
# perl -le 'print scalar localtime(shift)' 1154555640
Wed Aug 2 14:54:00 2006
#
The perl command can, of course, be invoked from Korn shell or any other scripting language of your choice.
The contents of this web page solely reflect the personal views of the authors and do not necessarily represent the views, positions, strategies or opinions of IBM or IBM management. Please use the
Add Comment link at the bottom of the page to provide feedback. Note: Until you sign up and log in (using links in the upper right corner of this web page), you will not see the
Add Comment link and you can not add a comment.