Q: how to find and kill processes running on my mac
Sometimes, when I try to delete item in the trash I get the message: "The operation can't be complete because the item "xxx.pdf" is in use."
How should I proceed to delete anyway?
MacBook Pro with Retina display, Mac OS X (10.7.5)
Posted on Jun 28, 2016 8:03 AM
If it's not immediately clear what process needs to be quit, what I do:
-drag the file or files out of the Trash to the Desktop
-open Terminal in Applications>Utilities
-enter "rm -rf" no quotes
-leave a space after rm -rf, and drag the file in question into the Terminal window.
-Hit return and it should be gone.
---------------------
For more stubborn cases, enter "sudo rm -rf" no quotes
-leave a space
-proceed as before and give your admin password (which won't appear in any form when entered) when requested.
----------------------
Still won't work? Put the file back in the Trash
sudo rm -rf ~/.Trash
There is a single space between sudo and rm
" rm and -rf
" -rf and ~/.Trash
----------------------------
If you REALLY want to find the process being used:
Open Terminal and paste this in (lsof means "list of open files.") Now you have to hunt down the one involved. Might need some trial and error.)
lsof -l +L -R -V | grep /
Posted on Jun 29, 2016 5:51 AM