IBM®
Skip to main content
    Country/region [select]      Terms of use
 
 
    
     Home      Products      Services & solutions      Support & downloads      My account     
 
developerworks > My developerWorks >  Dashboard > AIX > ... > AIXV53Howtos > AIXV53localtime
developerWorks
Log In   View a printable version of the current page.
Overview Connect Spaces Forums Wikis
AIXV53localtime
Added by OneSkyWalker, last edited by OneSkyWalker on Aug 18, 2009  (view change)
Labels: 
(None)

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.


 
    About IBM Privacy Contact