Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
fuser(1)
Edit
PageHistory
Diff
Info
LikePages
FUSER !!!FUSER NAME SYNOPSIS DESCRIPTION OPTIONS FILES EXAMPLES RESTRICTIONS AUTHOR SEE ALSO ---- !!NAME fuser - identify processes using files or sockets !!SYNOPSIS __fuser__ [[__-a__|__-s__] [[__-4__|__-6__] [[__-n__ ''space''] [[__-__''signal''] [[__-kimuv__] ''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. __r__ root directory. __m__ mmap'ed file or shared library. __fuser__ returns a non-zero return code if none of the specified files is accessed or in case of a fatal error. If at least one access has been found, __fuser__ returns zero. In order to look up processes using TCP and UDP sockets, the corresponding name space has to be selected with the __-n__ option. By default __fuser__ will look in both IPv6 and IPv4 sockets. To change the default, behavour, use the __-4__ and __-6 options. The socket(s) can be specified by the local and remote port, and the remote address. All fields are optional, but commas in front of missing fields must be present:__ __[[__''lcl_port''__][[__,__[[__''rmt_host''__][[__,__[[__''rmt_port''__]]]__ Either symbolic or numeric values can be used for IP addresses and port numbers. !!OPTIONS __-a__ Show all files specified on the command line. By default, only files that are accessed by at least one process are shown. __-k__ Kill processes accessing the file. Unless changed with __-__''signal'', SIGKILL is sent. An __fuser__ process never kills itself, but may kill other __fuser__ processes. The effective user ID of the process executing __fuser__ is set to its real user ID before attempting to kill. __-i__ Ask the user for confirmation before killing a process. This option is silently ignored if __-k__ is not present too. __-l__ List all known signal names. __-m__ ''name'' specifies a file on a mounted file system or a block device that is mounted. All processes accessing files on that file system are listed. If a directory file is specified, it is automatically changed to ''name''/. to use any file system that might be mounted on that directory. __-n__ ''space'' Select a different name space. The name spaces __file__ (file names, the default), __udp__ (local UDP ports), and __tcp__ (local TCP ports) are supported. For ports, either the port number or the symbolic name can be specified. If there is no ambiguity, the shortcut notation ''name''__/__''space'' __(e.g.__ ''name''__/__''proto''__) can be used.__ __-s__ Silent operation. __-u__ and __-v__ are ignored in this mode. __-a__ must not be used with __-s__. __-__''signal'' Use the specified signal instead of SIGKILL when killing processes. Signals can be specified either by name (e.g. __-HUP__) or by number (e.g. __-1__). __-u__ Append the user name of the process owner to each PID. __-v__ Verbose mode. Processes are shown in a __ps__-like style. The fields PID, USER and COMMAND are similar to __ps__. ACCESS shows how the process accesses the file. If the access is by the kernel (e.g. in the case of a mount point, a swap file, etc.), __kernel__ is shown instead of the PID. __-V__ Display version information. __-4__ Search only for IPv4 sockets. This option must not be used with the __-6__ option and only has an effect with the tcp and udp namespaces. __-6__ Search only for IPv6 sockets. This option must not be used with the __-4__ option and only has an effect with the tcp and udp namespaces. __-__ Reset all options and set the signal back to SIGKILL. !!FILES /proc location of the proc file system !!EXAMPLES __fuser -km /home__ kills all processes accessing the file system /home in any way. __if fuser -s /dev/ttyS1; then :; else__ ''something''__; fi__ invokes ''something'' if no other process is using /dev/ttyS1. __fuser telnet/tcp__ shows all processes at the (local) TELNET port. !!RESTRICTIONS Processes accessing the same file or file system several times in the same way are only shown once. If the same object is specified several times on the command line, some of those entries may be ignored. __fuser__ may only be able to gather partial information unless run with privileges. As a consequence, files opened by processes belonging to other users may not be listed and executables may be classified as mapped only. Installing __fuser__ SUID root will avoid problems associated with partial information, but may be undesirable for security and privacy reasons. __udp__ and __tcp__ name spaces, and UNIX domain sockets can't be searched with kernels older than 1.3.78. __udp__ and __tcp__ currently work with IPv6 and IPv4, but the address fields can only be IPv4 addresses. Accesses by the kernel are only shown with the __-v__ option. The __-k__ option only works on processes. If the user is the kernel, __fuser__ will print an advice, but take no action beyond that. !!AUTHOR Werner Almesberger !!SEE ALSO kill(1), killall(1), lsof(8), ps(1), kill(2) ----
4 pages link to
fuser(1)
:
Man1f
ENFILE
killall(1)
lsof(8)
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.