[Tutor] Get file last user

Steven D'Aprano steve at pearwood.info
Wed Jul 13 19:28:24 CEST 2011


Susana Iraiis Delgado Rodriguez wrote:
> Hello list!!!
> 
> I want to get the last user who accessed to a file, I already have the way
> to know who owns the file, but I really need to get this information.
> To get file user I'm using: os.environ.get("USERNAME") and to get the
> machine host: socket.gethostname()
> Is there a way to find out who used the file for the last time?


I don't believe so. As far as I know, that information simply isn't 
recorded anywhere.


-- 
Steven



More information about the Tutor mailing list