LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 08-13-2003, 05:15 PM   #1
dwof
LQ Newbie
 
Registered: Mar 2002
Location: Wageningen, The Netherlands
Distribution: RedHat 7.3 and 9.0
Posts: 13

Rep: Reputation: 0
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.
 
Old 08-13-2003, 05:19 PM   #2
dwof
LQ Newbie
 
Registered: Mar 2002
Location: Wageningen, The Netherlands
Distribution: RedHat 7.3 and 9.0
Posts: 13

Original Poster
Rep: Reputation: 0
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.
 
Old 08-13-2003, 05:45 PM   #3
acid2000
Member
 
Registered: Nov 2001
Location: Exeter, UK
Distribution: Gentoo 1.4
Posts: 243

Rep: Reputation: 30
The command exits but I can't remeber it. Does it begin with p? No help i'm sure.
 
Old 08-13-2003, 05:57 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,361
Blog Entries: 55

Rep: Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547
The database is "whatis", its accessed using "apropos".
The command to check on files in use is, depending on your needs, "fuser" or "lsof".
 
Old 08-13-2003, 06:06 PM   #5
dwof
LQ Newbie
 
Registered: Mar 2002
Location: Wageningen, The Netherlands
Distribution: RedHat 7.3 and 9.0
Posts: 13

Original Poster
Rep: Reputation: 0
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.
 
Old 08-13-2003, 06:35 PM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,361
Blog Entries: 55

Rep: Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547
Do "man whatis" and "man apropos" on your box. Lo and behold :-]
 
Old 08-13-2003, 06:43 PM   #7
dwof
LQ Newbie
 
Registered: Mar 2002
Location: Wageningen, The Netherlands
Distribution: RedHat 7.3 and 9.0
Posts: 13

Original Poster
Rep: Reputation: 0
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.
 
Old 08-13-2003, 06:46 PM   #8
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
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.
 
Old 08-13-2003, 06:59 PM   #9
dwof
LQ Newbie
 
Registered: Mar 2002
Location: Wageningen, The Netherlands
Distribution: RedHat 7.3 and 9.0
Posts: 13

Original Poster
Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
scp text file busy error seran Linux - General 3 03-24-2010 10:21 AM
How the Progress Bar of a copy file/directory process is progressed?(any logic)? kiranprashant Programming 3 03-08-2005 07:16 AM
/etc/rc.sysinit: /bin/awk: Text file busy teeno Linux - Software 5 02-23-2005 03:19 AM
process file in different directory izza_azhar Programming 1 02-15-2005 10:29 AM
libawt.so: libXp.so.6: cannot open shared object file: No such file or directory man26 *BSD 0 09-10-2004 09:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration