Tuesday, August 2, 2011

Fuser command

fuser is a UNIX command used to show which processes are using a specified file, file system, or socket.

# To list the process numbers of local processes using the /etc/passwd file, enter:

fuser /etc/passwd

# To list the process numbers and user login names of processes using the /etc/filesystems file, enter:

fuser -u /etc/filesystems

# To terminate all of the processes using a given file system, enter:

fuser -k -x -u -c /dev/hd1

or

fuser -kxuc /home

No comments:

Post a Comment