Operation Manual
13.9 User Information
13.9.1 User Accessing Files: fuser
It can be useful to determine what processes or users are currently accessing certain
les. Suppose, for example, you want to unmount a le system mounted at /mnt.
umount returns "device is busy." The command fuser can then be used to determine
what processes are accessing the device:
tux@mercury:~> fuser -v /mnt/*
USER PID ACCESS COMMAND
/mnt/notes.txt tux 26597 f.... less
Following termination of the less process, which was running on another terminal,
the le system can successfully be unmounted. When used with -k option, fuser
will kill processes accessing the le as well.
13.9.2 Who Is Doing What: w
With the command w, nd out who is logged onto the system and what each user is
doing. For example:
tux@mercury:~> w
14:58:43 up 1 day, 1:21, 2 users, load average: 0.00, 0.00, 0.00
USER TTY LOGIN@ IDLE JCPU PCPU WHAT
tux :0 12:25 ?xdm? 1:23 0.12s /bin/sh /usr/bin/startkde
root pts/4 14:13 0.00s 0.06s 0.00s w
If any users of other systems have logged in remotely, the parameter -f shows the
computers from which they have established the connection.
204 Reference










