Command fuser allows us to identify processes using files or sockets. Here are some example usages of fuser.
1. Identify processes using a file or directory:
fuser -v /path/to/the/fileORdirectory
2. Identify processes using a particular TCP/UDP port#:
fuser -v -n tcp port#
where option -n enables us to specify an object in a different name space, tcp port# here.
3. Kill processes that are executing a particular command:
fuser -v -k -i /path/to/the/command
where option -i specifies asking the user for confirmation before killing a process.
4. Kill processes using a particular TCP/UDP port#:
fuser -v -k -i -n tcp port#
No comments:
Post a Comment