diff --git a/wwho.py b/wwho.py index 9a4e0e5b..d74aa657 100755 --- a/wwho.py +++ b/wwho.py @@ -5,6 +5,10 @@ import os,string,getopt,time,sys,struct DATE (2000 May 22 06:12:08) wfile : idem, except : [-a (access)] FILE + +ça marche. mais la recherche ds le wtmp pour construire _sessions_ est +pas du tout optimale -> lent pour un gros wtmp. +Améliorations à prévoir.. """ optlist, args = getopt.getopt(sys.argv[1:], "adlb:p:f:") @@ -33,7 +37,10 @@ if not datesec : if date : if string.lower(os.path.basename(sys.argv[0]))=="wfile.py" : datesec=os.path.getmtime(date) #modif time - if all_last : datesec=os.path.getatime(date) #access time + if all_last : #access time + datesec=os.stat(date)[7] + # datesec=os.path.getatime(date) #BUG ! donne mtime ! + all_last=0 print " Chosen file Time : %s" \ %time.ctime(datesec) else :