Is there a fast way to check if a file handle is closed from the command line on os x?
lsof
works, of course, but is super slow.
You´ll probably want to check out the DTrace Family man dtrace
.
If you´re only interested on pure "file actions" you should have a look at opensnoop
, which builds on DTrace and has been included since Mac OS X 10.6.
You can show all file in use by a process (by -p pid or -n name) and watch files with -f /path/to/file .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With