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.xlsx or ~$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).

  • Try using app called Little Snitch, that might tell you that.
    – Ruskes
    Commented Sep 11, 2013 at 10:59
  • Thanks for the tip - Little Snitch looks interesting, but, it looks like it's more about software on my machine sending data to a network - whereas I'm looking for data about a file on a network drive being used by another network user. Maybe it might work if I installed it on the network drive itself... but in my case, IT* would freak out if I tried to do that (*IT sadly know little/nothing about Macs so aren't much help here...) Commented Sep 11, 2013 at 11:08
  • OK, with the new information provided, I do not think you can find that out, but your IT Mac expert could.
    – Ruskes
    Commented Sep 11, 2013 at 11:53
  • Sadly there is no IT mac expert... Just checking I've understood correctly: are you saying that you think that information about which user is using the file will only be available from the network server itself? So the data that my Mac gets telling it the file is unavailable will not include any data about why? (so the Mac just gets a binary "no" which it presumes is because the file is in use, rather than accessing any kind of actual live usage data?) Commented Sep 11, 2013 at 13:11
  • You mean Finder? Yes, it's set up so Finder browses it from /Volumes/pc/<directory structure> so I can do Get Info etc on all the files. It's listed under /Volumes as an ejectable drive (format SMB (NTFS)) Commented Sep 11, 2013 at 13:20

1 Answer 1


I have often been able to delete otherwise not deletable files by deleting the file in Terminal:

sudo rm /path/to/the/file/to/delete

Without sudo it still fails for me but ad it and files vanish like magic. If you don't know the specific unix file path just type "sudo rm " and then drag the file into the open Terminal window and it will insert the file.

Press ENTER, authenticate with your admin password and the file SHOULD vanish.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .