LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-23-2009, 03:05 PM   #1
f14f21
Member
 
Registered: Sep 2008
Distribution: rhel
Posts: 42

Rep: Reputation: 6
which program used file currently


hi buddies
is there any command line in shell to find out which program currently is using my specific file ?
in other words can i watch processes that uses my file ?

any suggestion appreciated

Last edited by f14f21; 07-23-2009 at 03:09 PM.
 
Old 07-23-2009, 03:26 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
yep, check lsof
 
Old 07-23-2009, 04:18 PM   #3
f14f21
Member
 
Registered: Sep 2008
Distribution: rhel
Posts: 42

Original Poster
Rep: Reputation: 6
Quote:
Originally Posted by acid_kewpie View Post
check lsof
thank u
 
Old 07-23-2009, 11:16 PM   #4
sokha
Member
 
Registered: Sep 2008
Posts: 46

Rep: Reputation: 15
-bash: lsof: command not found
what package should I install in centos for lsof?
 
Old 07-24-2009, 01:55 AM   #5
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Quote:
Originally Posted by sokha View Post
-bash: lsof: command not found
what package should I install in centos for lsof?
The package is... lsof. Most likely you have it already installed, but you need root privileges to run it.
 
  


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
Long file names on Linux file server jumbled when opening on 16-bit PC program. brandonhughesj General 3 03-04-2009 08:53 AM
Text File to Audio File Program ? rvijay General 5 04-10-2006 04:50 PM
Large file with c program exvor Programming 4 12-30-2005 10:54 AM
File copying program alltime Programming 8 02-27-2005 01:08 AM
File name formatting program dubya Programming 4 11-22-2004 09:07 PM


All times are GMT -5. The time now is 10:37 PM.

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