Kai Vermehr

Q: Can't empty trash with file with strange name

I have an old file named 'ˇ¡␀␀ˇ¡␀␀␀"9 ␀"9' which is not deleted when I empty the trash. I have tried renaming it but it does not accept any changes. Using the Terminal didn't work either so far:

 

Mac-Pro:deletethis me$ find . -inum 425884608 -delete

find: -delete: rmdir(./ˇ¡␀␀ˇ¡␀␀␀"9\006␀"9): Invalid argument


what can I do?

Mac Pro (Early 2009), OS X Mountain Lion (10.8.2)

Posted on Jun 2, 2016 7:33 PM

Close

Q: Can't empty trash with file with strange name

  • All replies
  • Helpful answers

Page 1 Next
  • by macjack,

    macjack macjack Jun 2, 2016 7:40 PM in response to Kai Vermehr
    Level 9 (55,694 points)
    Mac OS X
    Jun 2, 2016 7:40 PM in response to Kai Vermehr

    Have you tried using option + command + delete keys?

    If that doesn't work It may be the Trash from another volume, like Windows.

  • by Kai Vermehr,

    Kai Vermehr Kai Vermehr Jun 2, 2016 9:07 PM in response to macjack
    Level 1 (15 points)
    Mac OS X
    Jun 2, 2016 9:07 PM in response to macjack

    Yes I tried. Also I just booted from an older OSX 10.6 and it didn't help either. It's not a from another volume though. I can make a copy, but now the copy doesn't delete either. I'm stuck.

  • by WZZZ,

    WZZZ WZZZ Jun 3, 2016 7:26 AM in response to Kai Vermehr
    Level 6 (13,112 points)
    Mac OS X
    Jun 3, 2016 7:26 AM in response to Kai Vermehr

    Move that file out of the Trash to the Desktop, and then run this command in Terminal (copy/paste to avoid any mistakes)

     

    sudo rm -f

     

    important, leave a space and then drag the file into Terminal. It will automatically populate with the correct path for that file. Hit return and give your admin password, which will be requested. Note, you won't see your password when you type it in in any form, not even as ********

     

    If you've never used the sudo prefix before, you will get a scary warning. Ignore that and proceed. You should see the file disappear from the Desktop.

     

    Note: if somehow this is seen as a folder, not a file then the correct command will be

     

    sudo rm -rf

  • by Kai Vermehr,

    Kai Vermehr Kai Vermehr Jun 3, 2016 10:14 AM in response to WZZZ
    Level 1 (15 points)
    Mac OS X
    Jun 3, 2016 10:14 AM in response to WZZZ

    I can't move the file out of trash: "The operation can’t be completed because an unexpected error occurred (error code -50)."
    — and sudo rm -rf with the file in the trash didn't work either.

  • by WZZZ,

    WZZZ WZZZ Jun 3, 2016 10:24 AM in response to Kai Vermehr
    Level 6 (13,112 points)
    Mac OS X
    Jun 3, 2016 10:24 AM in response to Kai Vermehr

    This should take care of it, but be certain everything is entered EXACTLY as posted below.

     

    sudo rm -rf ~/.Trash

     

     

     

    There are single spaces between sudo and rm

     

                                                              rm and -rf

     

                                                     -rf and ~/.Trash

     

    NO SPACES IN  ~/.Trash

  • by macjack,

    macjack macjack Jun 3, 2016 10:28 AM in response to Kai Vermehr
    Level 9 (55,694 points)
    Mac OS X
    Jun 3, 2016 10:28 AM in response to Kai Vermehr

    Copy and paste the command into Terninal at the prompt.

  • by Kai Vermehr,

    Kai Vermehr Kai Vermehr Jun 3, 2016 10:33 AM in response to WZZZ
    Level 1 (15 points)
    Mac OS X
    Jun 3, 2016 10:33 AM in response to WZZZ

    It's not working — Terminal responds with 'Invalid argument'

  • by WZZZ,

    WZZZ WZZZ Jun 3, 2016 11:21 AM in response to Kai Vermehr
    Level 6 (13,112 points)
    Mac OS X
    Jun 3, 2016 11:21 AM in response to Kai Vermehr

    Maybe it doesn't know what to do with the ~ in ~/.Trash. In that case, open Terminal and run this command to make hidden files/folders visible.

     

    defaults write com.apple.finder AppleShowAllFiles -bool true ; killall Finder

     

    Next, in the root folder ("Macintosh HD") navigate to /Users>Your Home Folder and scroll down until you find Trash.

     

    Now, open Terminal again, or if it's still open, Shell>New Window

     

    and enter


    sudo rm -rf

     

    leave a space, drag in that Trash folder, and hit return. You should now see it disappear in your Home Folder.

     

    When you get a new prompt, to hide files/folders again enter

     

    defaults write com.apple.finder AppleShowAllFiles -bool false ; killall Finder

     

    To be certain you get a new Trash folder (this one just got deleted), log out and back in.

     

    If that isn't it, I'm out of ideas. Maybe post this question over in Technologies, where someone else may understand what's going on here.

     

    Mac OS X Technologies

  • by WZZZ,

    WZZZ WZZZ Jun 3, 2016 11:25 AM in response to WZZZ
    Level 6 (13,112 points)
    Mac OS X
    Jun 3, 2016 11:25 AM in response to WZZZ

    Sometimes a restart can fix things. Might also try running these commands from a safe boot. Shift key down at the startup chime.

  • by Kai Vermehr,

    Kai Vermehr Kai Vermehr Jun 3, 2016 11:28 AM in response to WZZZ
    Level 1 (15 points)
    Mac OS X
    Jun 3, 2016 11:28 AM in response to WZZZ

    Thanks @WZZZ — I restarted, restarted in safe mode, tried to delete the trash folder (the culprit file would not delete), etc. I've been through all sorts of suggestions found on the internet but nothing works. I will try making the ~ path visible, but I don't think this is the problem.

  • by WZZZ,

    WZZZ WZZZ Jun 3, 2016 11:41 AM in response to Kai Vermehr
    Level 6 (13,112 points)
    Mac OS X
    Jun 3, 2016 11:41 AM in response to Kai Vermehr

    Besides posting in Technologies, you could also try http://superuser.com/  or http://stackoverflow.com/  Think they're both the same login.

  • by Kai Vermehr,

    Kai Vermehr Kai Vermehr Jun 3, 2016 6:19 PM in response to WZZZ
    Level 1 (15 points)
    Mac OS X
    Jun 3, 2016 6:19 PM in response to WZZZ

    Thanks @WZZZ, will try Superuser! btw. Had a 1/2 phone session with Apple Support and they could not help. And even worse, the file was synced to my second computer via Dropbox and now it can't be deleted there either. What a mess.

  • by WZZZ,Helpful

    WZZZ WZZZ Jun 5, 2016 7:39 PM in response to Kai Vermehr
    Level 6 (13,112 points)
    Mac OS X
    Jun 5, 2016 7:39 PM in response to Kai Vermehr

    Did you speak to a "senior" tech at Apple? The senior techs, though not always as knowledgeable as they should be, are usually a better bet than the first tech support people who answer. 

  • by Dr.MORO,

    Dr.MORO Dr.MORO Jun 13, 2016 12:01 PM in response to Kai Vermehr
    Level 1 (9 points)
    Mac OS X
    Jun 13, 2016 12:01 PM in response to Kai Vermehr

    Hi everyone.

    I have been having the same problem with some files just like here, having strange characters in it.

    Mine are "TCP42S30-CutSheet.␀␀f" where probably the extension was ".PDF" before something happened.

    For me, I think I have moved this file to Trash last month in May, 2016, from my Dropbox folder.

    Tried most all things mentioned in the web, but still stuck with the "Invalid argument" in the Terminal.

    Even tried hooking up one Mac to another by Target Mode via Firewire 800, but still same "Invalid argument" error working from the system side.

    I actually have two (2) Macs with the same situation, both used above, possible from the same erroneously named yet different files.

     

    What I have NOT tried yet:

    • Rebuilding my running Mac systems from my backups, like Time Machine, which would be very time-consuming, as well as disruptive to my life, work AND play. I would really rather avoid doing this. Yet, some mention that the Trash files will not be restored. True? False? The other problem with this is, like here, I have tried to move the stuck files out of the Trash, only to create more new copies of these stuck files on my Desktop, (very BAD move...). All these files I cannot rename, nor move.
    • Try access from an older Mac OS system. Now having errors with the latest El Capitan 10.11.5, but just maybe from 10.10 or earlier will give me control? Maybe not with 10.6, though.
    • Call Apple support for help. But, looks like this is a no-go situation for now.

     

    One thing I do suspect, from what is listed here, is that this file was originally on my Dropbox folder, which I tried to delete from my Dropbox. This is when this file (folder that has it in) got stuck in the Trash. The Primary poster Kai Vermehr also mentions about Dropbox. Just a coincidence?

     

    I will be watching this post, in hopes that this can be fixed.

Page 1 Next