Is there any way to tell which user last accessed a file?
I have a script that monitors access to files (using 'stat' to get the access time) but I couldn't find any switches to show the user which performed the access.
I know about 'fuser' and 'lsof' but those commands identify open files and I just want to check last (completed) access. Any help would be appreciated. Thanks in advanced! :study: :) |
I suppose you can look at each user's home directory and find their .bash_history file
|
That depend on the O/S.
You'll need some kernel tracing facility. Under Solaris 10+ or the latest MacOS/X, a simple DTrace script would do the job. Under Linux, nothing equivalent exists. Simpler experimental ways to explore are KProbes, LTT, DProbes, SystemTraps and probably others. |
All times are GMT -5. The time now is 09:28 AM. |