Ever get a file stuck in the trash with no way to empty it? You know that message you get when you try and empty the trash:
> Can’t complete the operation because the item “ABC.XYZ” is in use.
If you look for a solution online you are often told to hold the option key while selecting `Finder > Empty Trash` (⌥⇧⌘⌫), or just reboot. While the first option never works, the second option does but seriously, how practical is that?
So here are two terminal commands to help you a) track down what application is holding the files hostage or b) properly force the trash to empty.
This first command, where `filename` is the name and extension of the file being held hostage, shows you what app or process has it’s death grip on that file:
The second command, should all else fail, allows you to perform a proper force-empty trash: