*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> fuser (1m)              
Title
Content
Arch
Section
 

Contents


 fuser(1M)                                                         fuser(1M)




 NAME    [Toc]    [Back]
      fuser - list processes using a file or file structure

 SYNOPSIS    [Toc]    [Back]
      /usr/sbin/fuser [-c|-f] [-ku] file ... [[-] [-c|-f] [-ku] file ...] ...

 DESCRIPTION    [Toc]    [Back]
      The fuser command lists the process IDs of processes that have each
      specified file open.  For block special devices, all processes using
      any file on that device are listed.  The process ID may be followed by
      a letter, identifying how the file is being used, as follows:

           c    file is current directory of the process.

           r    file is the root directory of the process, as set up by the
                chroot command (see chroot(1M)).

           o    The process has file open.

           m    The process has file memory mapped.

           t    file is the text file of the process.

      The process IDs associated with each file are printed to standard
      output as a single line separated by spaces and terminated with a
      single newline.  All other output - the file name, the letter, and the
      user name - is written to standard error.

    Options    [Toc]    [Back]
      fuser has the following options:

           -c   Display the use of a mount point and any file beneath that
                mount point.  Each file must be a file system mount point.

           -f   Display the use of the named file only, not the files
                beneath it if it is a mounted file system.  This is the
                default.

           -u   Display the login user name in parentheses following each
                process ID.

           -k   Send the SIGKILL signal to each process using each file.
                You must have appropriate privileges to kill processes that
                you do not own.

      You can respecify options between groups of files.  The new set of
      options replaces the old set.  A dash (-) by itself cancels all
      options currently in force.

    Operands    [Toc]    [Back]
      fuser has the following operand:



 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003






 fuser(1M)                                                         fuser(1M)




           file One of the following values:

                +  With the -f option, the name of a file.

                +  With the -f option, the name of a mounted file system or
                   special file.

                +  With the -c option, the name of a file system mount
                   point.

 NETWORKING FEATURES    [Toc]    [Back]
      You can use fuser with NFS file systems or files.  If the file name is
      in the format used in /etc/mnttab to identify an NFS file system,
      fuser treats the NFS file system as a block special device and
      identifies any process using that file system.

      If contact with an NFS file system is lost, fuser fails, since contact
      is required to obtain the file system identification.  Once the NFS
      file system is recontacted, stale file handles from the previous
      contact can be identified, provided that the NFS file system has the
      same file system identification.

 EXAMPLES    [Toc]    [Back]
      Terminate all processes that are preventing disk drive 1 from being
      unmounted, listing the process ID and login name of each process being
      killed.

           fuser -ku /dev/dsk/c201d1s?

      List process IDs and login names of processes that have the password
      file open.

           fuser -u /etc/passwd

      Combine both the above examples into a single command line.

           fuser -ku /dev/dsk/c201d1s? - -u /etc/passwd

      If the device /dev/dsk/c201d1s7 is mounted on directory /home, list
      the process IDs and login names of processes using the device.
      Alternately, if /home is the mount point for an NFS file system, list
      process IDs and login names of processes using that NFS file system.

           fuser -cu /home

      If machine1:/filesystem/2mount is an NFS file system, list all
      processes using any file on that file system.  If it is not an NFS
      file system, treat it as a regular file.

           fuser machine1:/filesystem/2mount




 Hewlett-Packard Company            - 2 -   HP-UX 11i Version 2: August 2003






 fuser(1M)                                                         fuser(1M)




 SEE ALSO    [Toc]    [Back]
      ps(1), mount(1M), kill(2), signal(2).

 STANDARDS CONFORMANCE    [Toc]    [Back]
      fuser: SVID2, SVID3


 Hewlett-Packard Company            - 3 -   HP-UX 11i Version 2: August 2003
[ Back ]
      
      
 Similar pages
Name OS Title
fuser IRIX identify processes using a file or file structure
AFinitmarkids IRIX specify a list of marker ID's for a new audio file in an AFfilesetup structure
AFinitmiscids IRIX initialize the list of miscellaneous data chunk ID's in an AFfilesetup file configuration structure, initializ
AFopenfile IRIX allocate an AFfilehandle structure for an audio file identified by name / by a Unix file descriptor
AFgetfd IRIX get the Unix file descriptor for the file associated with an AFfilehandle structure
ff_vxfs HP-UX fast find: list file names and statistics for a VxFS file system
lsattr Linux list file attributes on a Linux second extended file system
ff HP-UX list file names and statistics for a file system
ff_hfs HP-UX list file names and statistics for HFS file system
glio_group IRIX Defines a group of processes to be associated with a global file.
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service