Indestructible file...

Discussion in 'macOS' started by stardog24, Mar 13, 2011.

  1. stardog24 macrumors newbie

    Joined:
    Mar 13, 2011
    #1
    I have a file in my trash that is impossible to delete...

    I click empty trash and everything but this file is gone... I've tried to empty the trash using the Terminal, and I've tried Secure Empty Trash which gives me the message that the finder can not complete the operation as some data can not be read or written (error code -36)

    I would appreciate any help on this one...

    Cheers,
    Stardog
     
  2. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #2
  3. stardog24 thread starter macrumors newbie

    Joined:
    Mar 13, 2011
    #3
    The file was on an external drive, however I have had no luck whether the drive is mounted or not...
     
  4. tgurske macrumors newbie

    Joined:
    Sep 2, 2008
    #4
    First, drag the file back to your desktop and right click on it and choose "get info" Try to change the permissions on it so that you have permission to read and write.

    If that doesn't work open up terminal app (in applications > utilities) and type in "rm" then add a space and then drag the indestructible file into the window and it'll add the file path. Then click enter and it should delete the file. It should look something like this:
    Mac:~ username$ rm /Users/username/.Trash/file.rtf

    It might just give you a permission error though. In that case you will want to enable the root user: http://support.apple.com/kb/ht1528 and then in terminal enter "su root -p" to switch to the root user and then run the command above again. With the root user you have permission to do anything.
     
  5. stardog24 thread starter macrumors newbie

    Joined:
    Mar 13, 2011
    #5
    Dragging the file to desktop is a no go as it only makes a copy of the file... I can't move the file out of the trash in any way (deleting or moving)...

    I have tried the Terminal trick, but I have not tried it as the root user... I'll give it a go and see what happens...

    Cheers
     
  6. stardog24 thread starter macrumors newbie

    Joined:
    Mar 13, 2011
    #6
    No luck... Can't even delete as the root user... It may be getting close to format time...
     
  7. stardog24 thread starter macrumors newbie

    Joined:
    Mar 13, 2011
    #7
    Ok... Just looked into the .Trash folder and there is nothing in there, yet still the file is showing up in the Trash Can...

    *rips out hair in confusion and anger*
     
  8. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
  9. mjsmke macrumors 6502a

    Joined:
    Mar 2, 2010
    Location:
    UK
    #9
    Have you checked the file is not locked?

    If its not locked try this.

    Open terminal and type:

    sudo rm -rf ~/.Trash/

    Enter the administrator password.

    This forces the trash to empty.
     
  10. stardog24 thread starter macrumors newbie

    Joined:
    Mar 13, 2011
    #10
    Did a complete reinstall of OS X and restored from a Time Machine backup and the file is (thankfully) gone... No idea what was causing the problem, but rebooting or force emptying the trash still didn't work...

    Ah well... Thanks for the thoughts... :)
     
  11. datmr macrumors newbie

    Joined:
    Mar 14, 2011
    #11
    boot camp?

    it is probably a windows file in windows trash - it does this sometimes
     
  12. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #12
    :cool:
     
  13. datmr macrumors newbie

    Joined:
    Mar 14, 2011
    #13
    he could have connected an external drive while running under bootcamp

    i have seen bootcamp put un-deletable files into the trash, they typically take the form of files or folders containing the windows user SID

    emptying the trash from inside windows fixes this
     

Share This Page