1834200 Members
2807 Online
110066 Solutions
New Discussion

Re: files used by a user

 
federico_3
Honored Contributor

files used by a user

How can i do for knowing the files used in a time window by a generic user ?


Federico
6 REPLIES 6
Stefan Farrelly
Honored Contributor

Re: files used by a user


You need to download and install lsof, then the command;

lsof | grep (or lsof | grep )

lists all their open files.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Paula J Frazer-Campbell
Honored Contributor

Re: files used by a user

Hi

Lsof will identify the files currently in use by a user, but you wish to identify files opened over a period of time.

Stefan's command will work but needs to be in a small script that will run it - say every 20 seconds and pipe the output to a file.

Put the script in the users .profile and it will monitor what files they open.

Two problems:-

1. Load and disks space.
2. Your sleep in the script could allow a file to be opened and closed during the sleep period.

Just an Idea

Paula
If you can spell SysAdmin then you is one - anon
Laurent Paumier
Trusted Contributor

Re: files used by a user

If you convert to a trusted system, you'll have the ability to audit events such as file open, file close...
You can find documentation on http://docs.hp.com/
federico_3
Honored Contributor

Re: files used by a user

where can i find lsof for a 64 bits system? I installed lsof 4.48 and it does not work because my system is a 64 one.


Thanks
Federico
W. Sikkens
Advisor

Re: files used by a user

Hi, you can try http://hpux.tn.tudelft.nl/.
You have to make lsof yourself because an 64bit
lsof executable is not available, but it's all good documented how to do that.
Wietze Sikkens.
Fedon Kadifeli
Super Advisor

Re: files used by a user