LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 02: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 02:09 PM.
 
Old 07-23-2009, 02:26 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
yep, check lsof
 
Old 07-23-2009, 03: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, 10: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, 12:55 AM   #5
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
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



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 07:53 AM
Text File to Audio File Program ? rvijay General 5 04-10-2006 03:50 PM
Large file with c program exvor Programming 4 12-30-2005 09:54 AM
File copying program alltime Programming 8 02-27-2005 12:08 AM
File name formatting program dubya Programming 4 11-22-2004 08:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:48 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
Open Source Consulting | Domain Registration