Camille Hodoul

Watch file-system usage in real time on macOS | Camille Hodoul

Watch file-system usage in real time on macOS

August 03, 2023

The program fs_usage displays pathnames accessed by processes in real time.
It’s an extremely useful debugging tool.

It has options to select for the specific system calls or processes you’re interested in, or you can simply grep it.

For instance, if you’re unsure which php.ini file is used by your php environment, you can run

sudo fs_usage |grep "php.ini"

then run some php code and see pathnames in real time, as they are accessed:

fs_usage output

The output of this program is easier to read than something like dtruss, as long as you are only interested in file-system related system calls.

Read more


Camille Hodoul

I'm a JavaScript and PHP developer living in Grenoble, France.
Links