Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

The operation can’t be completed because the item “ ” is in use

For several days I have been trying to delete folders from a NAS server. All the time it says when moving to trash "The operation can’t be completed because the item “” is in use." even though I have restarted both computer and server hundreds of times. I have also been trying with the terminal with following


sudo rm -rf foldername (including complete path)

sudo rm -r foldername (including complete path)

sudo rm -rfd foldername (including complete path)

sudo rm -fd foldername (including complete path)

sudo rm -R -v foldername (including complete path)


All the time I get the message "Directory not empty"


I also tried with sudo chflags -R nouchg (including complete path) but still the same problem when trying to delete


It seems impossible to delete this folders from the NAS server, why is it like this!!!? Very frustrating!


I can rename the folder and move the folder but trying to delete = impossible!!


Any solution that works or is this a common problem for mac users? Windows users seems not to have this problem...


Is this a bug?

iPad 2, OS X Mountain Lion (10.8.2), Airport Extreme, Airport Disks, NAS

Posted on Jan 8, 2013 11:51 AM

Reply
24 replies

Jan 9, 2013 2:28 PM in response to soli004

Hello


Not clear to me which NAS you are using. Although maybe not a perfect solution, but a workaround: The Synology I am using has a user interface and a File Explorer buit in. With that I have faster access to the files. I am using this to quickly copy some several GB from one place to the other. Is much quicker than using Finder on the Mac. Same for deleting files.


Cheers


Michael

Jan 9, 2013 2:34 PM in response to Linc Davis

Dear Linc,


Sorry for posting this here, but there is no way to send a personal message. You were extremely helpful answering many of my questions several months ago in this thread:


https://discussions.apple.com/thread/4386839?answerId=19984655022#19984655022&ac_cid=op123456#19984655


Because I was busy with work I put the fixing of my computer on the backburner. A couple weeks ago I replied to one of your help replies and am wondering about the next step. I'd really appreciate it if you could check it out. I followed all your steps and got the information you were waiting for.


Thanks so much.

Jan 9, 2013 2:39 PM in response to Michael Heckner

Hello Michael,


I'm using www.serverelements.com called NASLite wich I have been happy with until now when I have this problem. I put the problem in the serverelements forum but no answer yet..


I did also report to netatalk support.


Very irritating when you can not delete folders and I have several of them. There seems to be hidden files in the folders that I can not see...


Thanks

Jan 10, 2013 10:02 AM in response to soli004

Searching more on Google I find that it is not only a NAS problem, there are people with USB drives etc etc (should we advice people to not use third party USB drives as well?) so it sounds more like an Apple problem!!? Many can fix the problem using the terminal to remove the file instead of Finder, why is that? Why are you forced to the terminal instead of the Finder? I don't think its "only" a netatalk problem, its a combination. What I have read and heard from others is that Apple is not very open whan it comes to the API for third party community to code on and it is a "moving target" and not stable.


Well I am not an expert on this, I only want this to be solved, but it seems I need a PC for that and not a Mac.

Jan 10, 2013 11:58 AM in response to soli004

This is part of the contents in the folders I can not remove


drwxr-xr-x NAS-User NAS-User Jan 06 21:15 <DIR> To_Trash

drwxrwxrwx admin admin Jan 10 19:18 <DIR> ..

drwxr-xr-x NAS-User NAS-User Jan 06 21:15 <DIR> .AppleDouble

drwxr-xr-x NAS-User NAS-User Dec 28 20:24 <DIR> Masterfiles

-rwxr--r-- NAS-User NAS-User Jan 07 2011 85 kB ._oXYgen Scan_1_1.tif

-rwxr--r-- NAS-User NAS-User Jan 06 2011 89 kB ._oXYgen Scan_1_12.tif

-rwxr--r-- NAS-User NAS-User May 29 2011 85 kB ._oXYgen Scan_1_137.tif

-rwxr--r-- NAS-User NAS-User May 30 2011 70 kB ._oXYgen Scan_1_137_Print.tif

-rwxr--r-- NAS-User NAS-User Mar 27 2011 146 kB ._oXYgen Scan_1_2.tif

-rwxr--r-- NAS-User NAS-User May 05 2011 70 kB ._oXYgen Scan_1_244.tif

-rwxr--r-- NAS-User NAS-User May 06 2011 62 kB ._oXYgen Scan_1_300.tif

-rwxr--r-- NAS-User NAS-User May 07 2011 77 kB ._oXYgen Scan_1_308.tif

-rwxr--r-- NAS-User NAS-User Jan 07 2011 87 kB ._oXYgen Scan_1_4.tif


drwxr-xr-x NAS-User NAS-User Dec 28 20:24 <DIR> Masterfiles

drwxr-xr-x NAS-User NAS-User Jan 06 21:15 <DIR> ..

-rwxr--r-- NAS-User NAS-User Mar 19 2011 50 kB .BridgeCache

-rwxr--r-- NAS-User NAS-User Mar 19 2011 20 MB .BridgeCacheT

-rwxr--r-- NAS-User NAS-User Oct 28 2009 4096 B ._.BridgeCache

-rwxr--r-- NAS-User NAS-User Oct 28 2009 4096 B ._.BridgeCacheT

-rwxr--r-- NAS-User NAS-User Mar 06 2011 70 kB ._15_P.tif

-rwxr--r-- NAS-User NAS-User Mar 06 2011 4096 B ._A_9385.tif

-rwxr--r-- NAS-User NAS-User Mar 06 2011 4096 B ._A_9386.tif

-rwxr--r-- NAS-User NAS-User Mar 06 2011 4096 B ._A_9387.tif

-rwxr--r-- NAS-User NAS-User Mar 06 2011 4096 B ._A_9388.tif

-rwxr--r-- NAS-User NAS-User Mar 06 2011 4096 B ._A_9389.tif


Another folder that gives me error: "The operation can’t be completed because an unexpected error occurred (error code -50)."


drwxrwxrwx NAS-User NAS-User Dec 20 18:04 <DIR> __A

drwxrwxrwx admin admin Jan 10 19:33 <DIR> ..

drwxrwxrwx NAS-User NAS-User Dec 18 10:35 <DIR> .AppleDouble

-rwxrwxrwx NAS-User NAS-User Dec 18 09:27 636 kB iTunes Library.xml

-rw-rw-rw- NAS-User NAS-User Dec 18 10:14 8 B sentinel


Thanks....

Jan 10, 2013 1:59 PM in response to Linc Davis

Well the link has the same error message and that is what I am searching for to find solutions.


In two folders I have "AppleDouble" files and in one I don't, still I can not delete the files...


To my understanding I have to go with a PC instead and life will be more easy...


Any recommendation for NAS service that DO work with Mac?!!!

Jan 11, 2013 2:48 PM in response to Linc Davis

Airport and Time Capsule is not for "professional work" where you need + 10 TB with backup and mirroring or raid solutions. I used SMB with 10.6 Snow Leopard but since upgrading to 10.8 Mountain Lion the SMB got broken and I never got it to work with SMB (I could ping the server, and only use ftp) so I had to rely on AFP and now the problems start... as I see it now is that Apple has put me into a corner...downgrade to Snow Leopard or go the PC route...

Jan 11, 2013 3:28 PM in response to soli004

You're not the only Mac user with such storage requirements. Far from it. I'm just not in a position to recommend a specific solution. You'd either have to do your own research or hire a consultant. Apple's solution for enterprise-grade distributed storage is Xsan. I have no experience with it. If you don't want to give up your NAS, then you should be using a computing platform that works well with it.

The operation can’t be completed because the item “ ” is in use

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.