Identifies processes using a file or file structure.
fuser [ -c | -d | -f ] [ -k ] [ -u ] [ -x ] [ -V ]File ...
The fuser command lists the process numbers of local processes that use the local or remote files specified by the File parameter. For block special devices, the command lists the processes that use any file on that device.
Each process number is followed by a letter indicating how the process uses the file:
c | Uses the file as the current directory. |
e | Uses the file as a program's executable object. |
r | Uses the file as the root directory. |
s | Uses the file as a shared library (or other loadable object). |
The process numbers are written to standard output in a line with spaces between process numbers. A new line character is written to standard error after the last output for each file operand. All other output is written to standard error.
The fuser command will not detect processes that have mmap regions where that associated file descriptor has since been closed.
fuser /etc/passwd
fuser -u /etc/filesystems
fuser -k -x -u /dev/hd1 -OR-
fuser -kxuc /home
Either command lists the process number and user name, and then terminates each process that is using the /dev/hd1 (/home) file system. Only the root user can terminate processes that belong to another user. You might want to use this command if you are trying to unmount the /dev/hd1 file system and a process that is accessing the /dev/hd1 file system prevents this.
fuser -d /usr
/dev/kmem | Used for the system image. |
/dev/mem | Also used for the system image. |
The killall command, mount command, and ps command.
For more information about the identification and authentication of users, discretionary access control, the trusted computing base, and auditing, refer to Standalone System Security in AIX 5L Version 5.2 Security Guide.