Friday, May 10, 2013

Find which process is using a file on Mac

Use this command
lsof | grep <filename>
or
lsof <filepath>
To ignore case, use
lsof | grep -i <filename>
Run it as root if the process is owned by root,
sudo lsof | grep -i <filename>
Refs

No comments:

Post a Comment