So, normally, if you run into the error
"The operation can’t be completed because the item ... is in use" while trying to modify a file, you look up what is using the file with
sudo lsof | grep <filename or part of filename>.
I'm having a problem where this doesn't work. The file in question is on a shared network drive (Active Desktop I believe, or something like that). The file is not in use on my machine - the above
lsof Terminal command gives nothing. So it seems that something else on the network is causing the file to be in use.
Nothing I've tried (
lsof, Get Info, rebooting, force-quitting Finder, opening the file in its own application...) helps or gives any clue about why it's locked like this.
How can I find out who or what on the network is using a particular file?
Background for my specific case: for me, the file in question is one of those hidden
~$whatever.xlmx 'ghost' temporary files that Excel for Mac likes to create, which cause Excel files to become uneditable when people inevitably disconnect from the network without closing Excel.
Normally, the easy fix is to delete the ghost file. This normally works fine - but at the moment it's not working with the above error and there's no clue I can see why not.
Also, normally, opening Excel files that are locked by a user gives a message like
"Locked for editting by <username>". There's no such message for this, which is unusual (but maybe just Excel for Mac being glitchy, probably not related to the general question).
On a Mac Pro running Lion (Excel for Mac 2011 in case that is relevant).