LinuxQuestions.org
Visit Jeremy's Blog.
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 06-06-2009, 05:08 AM   #1
imprise
LQ Newbie
 
Registered: May 2009
Distribution: SUSE
Posts: 20

Rep: Reputation: 0
fuser command


Hi all;

When I execute the fuser command as follows, the following output is appeared:

Code:
linux-bhpq:~ # fuser /media/cdrom
/media/cdrom:         7427c  7451c
linux-bhpq:~ #
I want to know what is "c" characters after the PIDs shown?

Thanks
 
Old 06-06-2009, 05:14 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Quote:
Originally Posted by imprise View Post
Hi all;

When I execute the fuser command as follows, the following output is appeared:

Code:
linux-bhpq:~ # fuser /media/cdrom
/media/cdrom:         7427c  7451c
linux-bhpq:~ #
I want to know what is "c" characters after the PIDs shown?

Thanks
Typing
Code:
man fuser
at the command line will produce this.

Quote:
fuser(1) - Linux man page
Name

fuser - identify processes using files or sockets
Synopsis

fuser [-a|-s|-c] [-4|-6] [-n space ] [-k [-i] [-signal ] ] [-muvf] name
fuser -l
fuser -V
Description

fuser displays the PIDs of processes using the specified files or file systems. In the default display mode, each file name is followed by a letter denoting the type of access:

c

current directory.

e

executable being run.

f

open file. f is omitted in default display mode.

F

open file for writing. F is omitted in default display mode.

r

root directory.

m

mmap'ed file or shared library.
That should answer your question, yes?
cheers,
jdk
 
Old 06-06-2009, 05:18 AM   #3
imprise
LQ Newbie
 
Registered: May 2009
Distribution: SUSE
Posts: 20

Original Poster
Rep: Reputation: 0
Thanks for your reply. I did searched the man page and find "current directory". I cannot understand what current directory means regarding to the PID that is shown.

Thanks again
 
Old 06-06-2009, 05:59 AM   #4
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
You really need to learn to use google:
http://oreilly.com/linux/command-dir...p?path=f/fuser
Is this clear enough?
Quote:
fuser

fuser [options] [files | filesystems]

Identifies and outputs the process IDs of processes that are using the files or local filesystems. Each process ID is followed by a letter code: c if process is using file as the current directory; e if executable; f if an open file; m if a shared library; and r if the root directory. Any user with permission to read /dev/kmem and /dev/mem can use fuser, but only a privileged user can terminate another user's process. fuser does not work on remote (NFS) files.

If more than one group of files is specified, the options may be respecified for each additional group of files. A lone dash (-) cancels the options currently in force, and the new set of options applies to the next group of files. Like a number of other administrator commands, fuser is usually installed to the /sbin directory. You may need to add that directory to your path or execute the command as /sbin/fuser.
jdk
 
  


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
How to kill processes using fuser? yuxingpiao Linux - Newbie 1 05-16-2008 10:18 AM
fuser -km /dev/cdrom yuxelfindik Linux - General 1 03-14-2007 02:50 PM
fuser -u filename.dat eswanepoel Linux - Security 4 02-20-2006 09:58 AM
Fuser command Gins Linux - General 3 08-09-2005 02:15 PM
fuser problem linuxxunil Debian 4 09-14-2004 12:02 PM

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

All times are GMT -5. The time now is 07:20 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