1834395 Members
1628 Online
110066 Solutions
New Discussion

file access

 
SOLVED
Go to solution
Stephen Badgett
Regular Advisor

file access

How can I check who is accessing a file in HP-UX?
Not as is, is now
7 REPLIES 7
Steven E. Protter
Exalted Contributor

Re: file access

fuser -cu /filesystem_name

root only.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
John Poff
Honored Contributor

Re: file access

Hi,

The 'fuser' command will show which process has a file open. Glance and lsof will also provide more information.

JP
A. Clay Stephenson
Acclaimed Contributor

Re: file access

If you need this information to be gathered over a period of time rather than simply just a snapshot of 'now' then you really need to download and install Tripwire. It can be configured to look at specific files.
If it ain't broke, I can fix that.
Robert-Jan Goossens
Honored Contributor
Solution

Re: file access

Hi,

Go for a tool like lsof,

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.67/

Hope this helps,
Robert-Jan.
Stephen Badgett
Regular Advisor

Re: file access

This is very helpful
Not as is, is now
Marco Santerre
Honored Contributor

Re: file access

I'd definitely go for a tool like lsof to give you exactly which files are accessed by a user/process
Cooperation is doing with a smile what you have to do anyhow.
Stephen Badgett
Regular Advisor

Re: file access

/usr/sbin/fuser -u /dev/ttyd2a2 -- perfect (:
Not as is, is now