search by tags

for the user

adventures into the land of the command line


View processes using a directory

$ fuser -v .
                     USER        PID ACCESS COMMAND
/root:               root       3378 ..c.. vim
                     root       3398 ..c.. bash
                     root       3449 ..c.. bash
                     root      19370 ..c.. bash

Find processes using a tcp or udp socket

$ nc -l -p 80
$ fuser -v -n tcp 80
                     USER        PID ACCESS COMMAND
80/tcp:              root       3846 F.... nc

Find processes accessing a file

$ fuser -v -m example.txt
                     USER        PID ACCESS COMMAND
/root/example.txt:   root     kernel mount /
                     root          1 Frce. init
                     root          2 .rc.. kthreadd
                     root          3 .rc.. ksoftirqd/0
                     root          6 .rc.. migration/0
                     root          7 .rc.. watchdog/0
                    exampleuser   23347 .r.e. gcalctool
                    exampleuser   24527 f..e. chrome
                    exampleuser   25388 f..e. chrome
                    exampleuser   25628 .r.e. evince
                    exampleuser   25634 .rce. evinced
                    exampleuser   25706 .rce. gm-notify
                    exampleuser   25769 .rce. at-spi-bus-laun
                    exampleuser   28191 .rce. mate-settings-d
                    exampleuser   28193 .rce. mate-screensave
                    exampleuser   29942 f..e. chrome
                    exampleuser   30044 .r.e. evince
                    exampleuser   32721 f..e. chrome