Operating System - HP-UX
1835867 Members
3084 Online
110085 Solutions
New Discussion

Re: a problem about fuser

 
lin.chen
Frequent Advisor

a problem about fuser

I use fuser to find which user has used the derectory.
fuser -cu /tmp
but I can not see who has used /tmp/tem1 and
/tmp/tem2.
is there any solution?thanks
6 REPLIES 6
Bill Hassell
Honored Contributor

Re: a problem about fuser

Directories are busy when someone opens the directory by cd'ing into it. If users are in another directory and open a file with a full pathname such as /tmp/tem1/somefile, then the tem1 directory will not be busy. You will have to investigate each of the files in tem1 or tem2 to see which file(s) are busy.


Bill Hassell, sysadmin
RAC_1
Honored Contributor

Re: a problem about fuser

fuser isn't good at it. lsof +D /dir_name gives all files that are busy under it.
There is no substitute to HARDWORK
lin.chen
Frequent Advisor

Re: a problem about fuser

I just want to see all directory in /tmp by fuser command
Yogeeraj_1
Honored Contributor

Re: a problem about fuser

hi,

did you try?

ll /tmp |grep "drw"


kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Mark A. Smith
Occasional Advisor

Re: a problem about fuser

A user does not have to be in a file system
to make it busy, a program can keep a file system busy and even make it so that it cannot be umounted, so "fuser -u /filesystem" comes up blank, in that case you would have to know which program can be doing that and stop it.
Sp4admin
Trusted Contributor

Re: a problem about fuser

hi,

You should beable to use "fuser -kc" to see what process is holding that directory. What ever PID returns from fuser you should beable to kill that process.