Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fuser(1) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

killall

mount

ps

kill

signal



FUSER(1,C)                  AIX Commands Reference                   FUSER(1,C)



-------------------------------------------------------------------------------
fuser



PURPOSE

Identifies processes using a file or file structure.

SYNTAX


         +--------+   +- -n namelist -+   +-----+
fuser ---| +----+ |---+- -c corefile -+---|     |---|
       ^ +-| -k |-+   +---- file -----+   +- - -+ |
       |  ^| -u ||      ^          |              |
       |  |+----+|      +----------+              |
       |  +------+                                |
       +------------------------------------------+


DESCRIPTION

The fuser command lists the process numbers of the processes on the local
cluster site which are using the specified file.  For block special devices,
all processes using any file on that device are listed.  The process number is
followed by a letter indicating how the process is using the file:

c  Using file as the current directory
p  Using file as the parent of the current directory (only when in use by the
   system)
r  Using file as the root directory.

The process numbers are written as a single line to standard output, separated
by spaces and ended with a single new-line character.  All other output is
written to standard error.

FLAGS

-c corefile  Reports on the specified core file.

-k           Sends the SIGKILL signal to each process.  Only the person
             operating with superuser authority can kill another user's process
             (see "kill").

-n namelist  Reports on the kernel files specified by the namelist argument.

-u           Indicates the login name in (parentheses) after the process
             number.

-            Cancels any flags selected for the previous set of file or files.




Processed November 8, 1990        FUSER(1,C)                                  1





FUSER(1,C)                  AIX Commands Reference                   FUSER(1,C)



Flags may be respecified between groups of files on the command line.  The new
set of flags replaces the old set.

EXAMPLES

  1. To list the ID numbers of the processes using the /etc/passwd file:

      fuser  /etc/passwd

  2. To list the process IDs and user names of the processes using the
    /etc/filesystems file:

      fuser  -u  /etc/filesystems

  3. To kill all of the processes using a given disk drive:

      fuser  -k  -u  /dev/hd1

    This command lists the process ID and user name, and then stops each
    process that is using the "/dev/hd1" disk drive.  You must have superuser
    authority to stop processes that belong to someone else.  You might want to
    do this if you are trying to unmount the disk drive "/dev/hd1", and a
    process accessing it is preventing you from doing so.

  4. To perform the actions of the previous examples in reverse order:

      fuser  -k  -u  /dev/hd1  -  -u  /etc/filesystems  -  /etc/passwd

    Lone hyphens before the "-u" and before "/etc/passwd" turn off both the
    "-k" and "-u" flags.

FILES

/unix         System kernel image.
/dev/kmem     Default system image file.
/dev/mem      Default user memory.

RELATED INFORMATION

See the following commands:  "killall,"  "mount," and  "ps."

See the kill and signal system calls in AIX Operating System Technical
Reference.












Processed November 8, 1990        FUSER(1,C)                                  2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026