- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How do I find out who is using a particular file?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-04-2002 01:42 PM
тАО04-04-2002 01:42 PM
I know fuser can tell us about file system but I want to find out about the FILE.
thanks,
-pap
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-04-2002 01:45 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-04-2002 01:45 PM
тАО04-04-2002 01:45 PM
Re: How do I find out who is using a particular file?
# fuser -u /mount/point/filename
You can also download and use lsof. It is available from:
http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.61/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-04-2002 01:45 PM
тАО04-04-2002 01:45 PM
Re: How do I find out who is using a particular file?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-04-2002 04:07 PM
тАО04-04-2002 04:07 PM
Re: How do I find out who is using a particular file?
ps -ef | grep
note the PID # and all the PPID # for it until you find the shell.
who -u
Look for any of the numbers noted and see which user has them.
I know, it's long and ugly, but I'm in a strange mood today and for some reason, it popped into my head.
Must be the only 4 hours sleep I got last night.
Good luck you ya,
Kel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-04-2002 04:25 PM
тАО04-04-2002 04:25 PM
Re: How do I find out who is using a particular file?
Stick with either lsof (if installed) or fuser
fuser -u /path/to/file gives the username along with the process id that is touching the file.
lsof |grep /path/to/file/name will also spit out a list of usernames that are touching a file, and a wealth of other information that could be of possible interest.
hth
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2002 08:49 AM
тАО04-05-2002 08:49 AM
Re: How do I find out who is using a particular file?
Admittedly, even if my suggestion did work, I wouldn't be suprised if you had to chase PPIDs making it a real pain to use.
But, for some reason, it popped in my head.
The worse part is, I had a triple shot of espresso yesterday and it still didn't help! ;)
Oh well, I feel much better today.
Kel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2002 09:12 AM
тАО04-05-2002 09:12 AM
Re: How do I find out who is using a particular file?
It is a great thing that you were wrked so hard for the day and took time to respond my question.
Appreciated your effort.
-pap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2002 09:43 AM
тАО04-05-2002 09:43 AM
Re: How do I find out who is using a particular file?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2002 09:49 AM
тАО04-05-2002 09:49 AM
Re: How do I find out who is using a particular file?
You'll get absolutely no argument from me on the utility & IMPORTANCE of lsof.
NO HP shop should be w/o it!
We were just pointing out to Piyush that fuser -u can go down to the file level as most people (I included until a while ago) thought fuser only operated at the FS level.
Looking for a way to live TAX free,
Jeff
....exspecially this time of year......