13Mar/060
fs_usage
Check this out. This little known utility will tell you basically anything you want to know about what is going on in OSX.
$ sudo fs_usage
WTF is CACHE_HIT? (It's OS X's caching capabilities, obviously). Let's get rid of them. Include the -e switch, which instructs fs_usage not to include itself in its own output. Then limit the output to only the file system using the -f filesys:
$ sudo fs_usage -e -f filesystem
OK, there's still too much there. Let's get rid of all the CACHE_HIT references:
$ sudo fs_usage -e -f filesystem|grep -v CACHE_HIT|grep -v grep
OK. This is pretty cool. now we can restrict it to only files being read:
$ sudo fs_usage -e -f filesystem|grep -v CACHE_HIT|grep -v grep|grep open
Or, files being written to your disk:
$ sudo fs_usage -e -f filesystem|grep -v CACHE_HIT|grep -v grep|grep write


