Help please: can't delete folder in trash

Discussion in 'macOS' started by ozira, Jul 23, 2012.

  1. ozira macrumors newbie

    Joined:
    Jul 23, 2012
    #1
    Hi there,

    I'd be grateful if anyone can help me with the following issue.

    I've deleted a folder off my external harddrive but cannot delete it from my trash nor restore it to that drive. It seems as though my computer thinks it's a directory drive (it was a duplicate music folder containing .mp3 files though they seem to be listed as 'alias' files now). Some months ago I set my trash to 'securely delete' as default. I am on a 2011 Macbook Pro (Mac OS X 10.6.8).

    When I try to securely empty the trash, I get a message saying that the folder is in use. After searching for a solution online, I have tried all of the following:

    1. Securely empty trash (from right-click menu, Finder menu and trash interface button)
    2. Pressing option and delete, option+shift+command+delete, holding option down while selecting secure delete etc in trash
    3. Downloaded and used Trash It! (v5.0) - this deleted all the other files in trash except for the offending folder
    4. Opening Terminal, typing 'rm' followed by a space, dragging and dropping the offending folder into the Terminal window and pressing return in Terminal (this is when I learnt that my system appears to think this is a directory folder).

    So none of these options have worked - I have since attempted to restore the file to it's original (non-Trash) location only to find that this is no longer an option for this folder either.

    Any help would be very much appreciated, though I should note that I have no programming skills and am far from a technical wiz. Thanks heaps in advance :)
     
  2. heisenberg123 macrumors 603

    heisenberg123

    Joined:
    Oct 31, 2010
    Location:
    Hamilton, Ontario
    #3
    i just skimmed through you post fast but i don't see "reboot" as on of the things you tried
     
  3. ozira thread starter macrumors newbie

    Joined:
    Jul 23, 2012
    #4
    Thanks GGJStudios, I'm working through some of the options provided now.

    So far I've renamed the folder because of potentially strange characters (it was a Sigur Ros album) but have been unable to rename the alias/.mp3 files (error message: “The Operation Can’t Be Completed. An unexpected error occurred (error code -43).”).

    I can’t see anything to indicate that the folder or files are locked. I have read and write access to the folder, but when I examine the individual files within the folder it says “You have unknown access” and can’t seem to generate a preview.

    I'm beginning to suspect my computer is somehow reading these files as if they have 'immutable flags' so will try to follow the processes outlined here: http://www.thexlab.com/faqs/immutableflags.html to see if that works.

    Otherwise it looks like I will have to attempt to completely delete and then recreate the trash for my account (as per instructions at ‘Empty and recreate an account's Trash’ here: http://www.thexlab.com/faqs/trash.html#Anchor-Trash-33869).

    All of this is quite scary for a novice like me, but thanks for your help - I'll keep working through those links and get back to you if I can't find a solution there.

    Cheers

    ----------

    Hi iisforiphone,

    I ran into this problem last night and tried both a reboot and shut down for six hours overnight hoping the issue was resolve itself but sadly it's still with me.

    Thanks for picking that up though - it's solved many a problem before!

    ----------

    Oh, I should also mention that I can't drag the folder onto my desktop from the trash (I get error message: "The Finder can’t complete the operation because some data in “sigur ros” can’t be read or written. (Error code -36)."
     
  4. ozira thread starter macrumors newbie

    Joined:
    Jul 23, 2012
    #6
    OK, so I've tried following the instructions re: immutable flags, but when I type in the instructions under 'Determining the flags set on an object' at http://www.thexlab.com/faqs/immutableflags.html (in Terminal) I get the following:

    Last login: Tue Jul 24 10:33:24 on ttys000
    [my name]-MacBook-Pro:~ [my name]$ ls -lhdO/Volumes/[external harddrive name]/.Trashes/501/sigur\ ros
    ls: illegal option -- /
    usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]
    [my name]s-MacBook-Pro:~ [my name]$​

    I have also tried to determine whether the files are 'in use' by another program but following the instructions under "Files in use by other applications" at http://www.thexlab.com/faqs/trash.html#Anchor-Trash-33869 comes up empty which I have interpreted to mean that the file is not in use.

    I'm slightly worried that attempting to completely delete my Trash and then create a new one under my account could create more problems for me as I don't really understand the server-side stuff. Do you think it is safe for me to follow the instructions under "Empty and recreate an account's Trash" at http://www.thexlab.com/faqs/trash.html#Anchor-Trash-33869 given that I don't really know what I'm doing?
     
  5. ozira thread starter macrumors newbie

    Joined:
    Jul 23, 2012
    #7
    Thanks Coffee87. I've downloaded Curb, but when I attempt to drag and drop my external harddrive into it, I am getting the following message:

    "Non-Removable Media Detected. Curb only handles removable media such as USB Keys."

    I guess I just have to try deleting the trash box for my account and creating a new one?
     
  6. ozira thread starter macrumors newbie

    Joined:
    Jul 23, 2012
    #8
    Hi again, sorry - this is probably a ridiculously stupid question, but the first step in deleting my trash account and creating a new one tells me to "log in to your Admin account" - can someone advise me on how to do this? (sorry if that's the dumbest question you've ever been asked...)
     
  7. ozira thread starter macrumors newbie

    Joined:
    Jul 23, 2012
    #9
    Well I didn't have the expertise to delete my Trash and create a new one for my account, but I have managed to resolve the issue and thought I would share the solution here in case anyone ever experienced a similar problem and found this thread through a search.

    I successfully resolved the issue by plugging my external hardrive into my old, crusty Dell laptop and deleting the ghost trash icon that appeared on the external account. Now when I plug my external hardrive back into my macbook pro, the trash can is empty.

    Hope that helps someone else, cheers
     
  8. benwiggy macrumors 68020

    Joined:
    Jun 15, 2012
    #10
    You need a space between the options and the filename. You also have to include the ACTUAL name of the hard drive, not [external harddrive]. If there are any spaces in the name, you will have to escape them with a \ backslash, in the same way that you have for the actual file's name.

    It is very important that you understand how Terminal commands work before entering them, as one space in the wrong place can have catastrophic consequences.

    Generally, you have the command, followed by a space, then some flag options, like "-ls", then space, then the filepath. Spaces are separators, so you can include several filenames. If you put a space in a filename without "escaping" it, it will be read as two different filenames.
     
  9. ozira thread starter macrumors newbie

    Joined:
    Jul 23, 2012
    #11
    Hi benwiggy,

    Thanks for your post and sorry for the confusion. I replaced my actual name with [my name] for relative anonymity purposes only when posting to this thread - that text is just a cut and paste from Terminal with my name edited out. I followed the instructions under 'Determining the flags set on an object' at http://www.thexlab.com/faqs/immutableflags.html precisely - the error wasn't in my typing, it had to do with how my mac was reading the folder and sub-files.

    Cheers
     
  10. stchman macrumors 6502a

    Joined:
    Jul 16, 2012
    Location:
    St. Louis, MO
    #12
    I had a problematic file in the trash that would not delete as well. I used the command line:


    sudo rm -rf ~/.Trash/<file_to_delete>

    This works.

    Remember, sudo rm -rf is a VERY powerful command. If not properly used it will permanently delete files that you may want, so use carefully.
     

Share This Page