Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-13-2003, 05:15 PM
|
#1
|
LQ Newbie
Registered: Mar 2002
Location: Wageningen, The Netherlands
Distribution: RedHat 7.3 and 9.0
Posts: 13
Rep:
|
which process uses a busy file/directory
Hi People,
What is the command to check which process uses a certain file or directory. When I want to unmount a directory that is busy, I would like to check which process/usr/etc uses that directory.
I know there should be a way to check this, I even used it once, but I completely forgot what it is and where I found it.
Thank,
Dolf.
|
|
|
08-13-2003, 05:19 PM
|
#2
|
LQ Newbie
Registered: Mar 2002
Location: Wageningen, The Netherlands
Distribution: RedHat 7.3 and 9.0
Posts: 13
Original Poster
Rep:
|
It may be a good idea to have a good database with all the linux commands and most basic/used command-line programs, together with searchable descriptions so it would be easy to find the right command. The tips 'n tricks, mentionned in two threads on this forum, could also be included in that.
If some person was a lot faster than me (which wouldn surprise me at all  ) and all this exists already, please tell me where I can find it.
Thanks,
Dolf.
|
|
|
08-13-2003, 05:45 PM
|
#3
|
Member
Registered: Nov 2001
Location: Exeter, UK
Distribution: Gentoo 1.4
Posts: 243
Rep:
|
The command exits but I can't remeber it. Does it begin with p? No help i'm sure.
|
|
|
08-13-2003, 05:57 PM
|
#4
|
Moderator
Registered: May 2001
Posts: 29,415
|
The database is "whatis", its accessed using "apropos".
The command to check on files in use is, depending on your needs, "fuser" or "lsof".
|
|
|
08-13-2003, 06:06 PM
|
#5
|
LQ Newbie
Registered: Mar 2002
Location: Wageningen, The Netherlands
Distribution: RedHat 7.3 and 9.0
Posts: 13
Original Poster
Rep:
|
Quote:
Originally posted by unSpawn
The database is "whatis", its accessed using "apropos".
|
Thanks, the lsof was what I was looking for.
About the database, what do you mean. Is there I database like the one I was thinking about? And where is it? On hte internet or on my linux box. What is ¨whatis¨ and what is ¨apropos¨. I dont understand that part of your message.
Thanks for helping.
Cheers,
Dolf.
|
|
|
08-13-2003, 06:35 PM
|
#6
|
Moderator
Registered: May 2001
Posts: 29,415
|
Do "man whatis" and "man apropos" on your box. Lo and behold :-]
|
|
|
08-13-2003, 06:43 PM
|
#7
|
LQ Newbie
Registered: Mar 2002
Location: Wageningen, The Netherlands
Distribution: RedHat 7.3 and 9.0
Posts: 13
Original Poster
Rep:
|
Great! I didn't knwo there was such a database on my linux box. Are there more databases I should know about except locate en whatis? I would have found fuser end lsof myself if I knew about apropos.
Tip for people reading this, use apropos keyword|grep secondkeyword to refine your search.
Cheers,
Dolf.
|
|
|
08-13-2003, 06:46 PM
|
#8
|
Senior Member
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794
Rep: 
|
Btw it seems that if you've cd'ed into a directory and then want to unmount something from it, you cant. You'll have to cd to somewhere else before using umount.
|
|
|
08-13-2003, 06:59 PM
|
#9
|
LQ Newbie
Registered: Mar 2002
Location: Wageningen, The Netherlands
Distribution: RedHat 7.3 and 9.0
Posts: 13
Original Poster
Rep:
|
I know. There was a process using a file in the share I was trying to unmount. found the process, program an the specific file being used. Decided to kill it. Problem solved. lsof works better than fuser for this because it also gives back the user, program and specific file concerned. More information than fuser.
Dolf.
|
|
|
All times are GMT -5. The time now is 12:39 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|