Script: Display all processes accessing a device [update]

Posted on 15 September 2008 - 22:36 in Programming - Comments (2)

The following script is a wrapper over the commands ‘fuser’ and ‘ps’ to display all processes accessing a mountpoint.

Syntax: fuserps [-g] /path/to/mountpoint

The normal mode displays the output on the console.
With the switch ‘-g’, its possible to graphically display the output with zenity (included in Ubuntu), also:

  • The target is optional, zenity will ask for it if not yet present
  • You can kill processes

Executing the script with root access results in displaying all processes from all users, a normal execution only displays the processes from the executing user.

(more…)


This work is licensed under a Creative Commons Attribution 2.5 Switzerland License
Powered by WordPress