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

Previous Page 2
  • by Dr.MORO,

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

    Self-reply, sorta.

     

    Just found this:

    Re: Cannot delete/rename/move a file from Windows with a special character

     

    Seems like a doable thing to try.

    I will explore this option.

    And for whatever outcome, I will post the results here.

    Hopefully positive, and soon.

  • by macjack,

    macjack macjack Jun 13, 2016 12:46 PM in response to Dr.MORO
    Level 9 (55,682 points)
    Mac OS X
    Jun 13, 2016 12:46 PM in response to Dr.MORO

    Hello again Kai,

     

    If the folder is from another volume, like Windows...

    Boot into your Windows volume and run run Chkdsk utility.

  • by Dr.MORO,

    Dr.MORO Dr.MORO Jun 13, 2016 2:31 PM in response to macjack
    Level 1 (9 points)
    Mac OS X
    Jun 13, 2016 2:31 PM in response to macjack

    Hi macjack,

     

    Quick question: Would it be possible to boot into Windows Bootcamp partition, and delete these problematic Mac files?

  • by macjack,

    macjack macjack Jun 13, 2016 4:16 PM in response to Dr.MORO
    Level 9 (55,682 points)
    Mac OS X
    Jun 13, 2016 4:16 PM in response to Dr.MORO
  • by Dr.MORO,

    Dr.MORO Dr.MORO Jun 17, 2016 2:00 PM in response to Dr.MORO
    Level 1 (9 points)
    Mac OS X
    Jun 17, 2016 2:00 PM in response to Dr.MORO

    Hi again everyone!


    Great news!  I might have a solution!

     

    At least what I did & is described below worked & fixed (weird trash ALL GONE!) with two (2) different Macs having the same issue. Basically followed the above-mentioned Re: Cannot delete/rename/move a file from Windows with a special character Discussion's solution.

     

    "Boot into Mac OS X system other than 10.11 El Capitan, and use Terminal to delete files."

     

    What you need:

    • A Mac with a 'stuck' file, obviously, but this must to be able to boot into Mac OS X 10.10 Yosemite.

              (If a newer Mac, and can only boot in Mac OS X 10.11 El Capitan, my solution here will not work. Sorry...)

    • USB stick drive large enough to install the Mac OS X 10.10 Yosemite Install disk.

              (I used the donation-ware DiskMaker X 5 to create the Mac OS X 10.10 Yosemite Install disk onto the USB drive.

              (This could be another Mac OS X 10.10 system on another hard drive, I presume.)

    • A printout of this post, as you will not be able to read this post on your Mac while fixing, unless you have an alternative method to read this.
    • Backup, backup, backup! (Always need this when your playing with Terminal fire!)

     

    Protocol: (I am definitely NOT an expert, so I am sorry for the not-so-good terminology, yet you should get it, I hope.)

    1. Backup everything!!!
    2. Open the Terminal app in your Utilities folder.
    3. Into the Terminal window, Drag & Drop the problematic file. The window will show you the exact path of where your file is.
    4. Write/Record this entire path, as you will need to know this information later when deleting the problematic file. (Do not record on the Mac with problems)
    5. Close Terminal app.
    6. Create Mac OS X 10.10 Yosemite Install disk onto the USB drive. (Donation-ware DiskMaker X 5, did the trick for me.)
    7. Re-boot Mac while holding down the "Option" key, and select Mac OS  X 10.10 Install disk to startup.
    8. Once finished starting up, go to the menu bar, and select the Terminal app to open. (A window will open up, and you should get a prompt like -Bash-3.2# )
    9. Type "cd /Volumes && ls", and hit Enter. (You should see all the drives/volumes attached to your Mac.)
    10. Referencing to the path you've recorded above of the problematic file, navigate your way down & into the directory/folder of where it resides.
      • To navigate, use "ls" command to list all the files & folders/directories at the directory level you are presently at.
      • To go down a directory level, type "cd ./directory_name", and to go up a level type "cd ../".
      • Every time you move a directory, type "ls" to confirm where you are, and what's in this directory.
      • If the file or directory name contains a 'space', add a "\" before the 'space'. (For "File Name", type "File\ Name").
    11. Once you have successfully located your problematic file in your present directory (presumably in the ./.Trashes/501), delete the file as follows:
      1. In the Terminal window, after you type "ls" to confirm what's in this directory, copy the problematic file name using the mouse/trackpad.
      2. Type "rm -i ./", then paste the copied file name after this. DO NOT hit Enter just yet.
      3. Presumably the problematic file name somewhat looks like "BADfile.?????".
      4. Hit the Delete key several times to shorten the file name, so it does not contain any "?" in it.
      5. Type "*" (asterisk, an auto-fill wildcard) immediately after the shortened file name, without any space.
      6. Now, time to hit Enter.
      7. A prompt should show the problematic file's entire name, and ask if you want to delete it.
      8. To delete, type "Y" or "Yes", and hit Enter. (N or No, if not...)
      9. Confirm your action by typing the "ls" commend. Is the file gone?
    12. Quit Terminal app, and quit Mac OS X 10.10 Yosemite Install. Select Startup disk window will appear.
    13. Reboot into your El Capitan system.
    14. Check and confirm the problematic file is gone. Hurray! Hopefully, you did it!

     

    I actually was able to delete a similar file from my Desktop as well with this method.

    All my problematic "Invalid argument" files are finally gone! Yippee!

     

    Hope this works for others.

    And feel free to streamline the protocol and other things.

     

    Thanks & Good Luck!

     

    ~ Dr.MORO

  • by WZZZ,

    WZZZ WZZZ Jun 17, 2016 2:09 PM in response to Dr.MORO
    Level 6 (13,087 points)
    Mac OS X
    Jun 17, 2016 2:09 PM in response to Dr.MORO

    just to note: you could do this booted from a clone.

  • by Dr.MORO,

    Dr.MORO Dr.MORO Jun 17, 2016 2:21 PM in response to WZZZ
    Level 1 (9 points)
    Mac OS X
    Jun 17, 2016 2:21 PM in response to WZZZ

    Hey WZZZ,

     

    I presume you are talking about accessing from a boot clone of Mac OS X 10.10 Yosemite, not from a 10.11 El Capitan clone, correct?

     

    To note, I have tried using the Target Disk Mode (TDM) to delete the problematic files on El Capitan, from another 10.11 El Capitan system, but this did not work. I am thinking this is a 10.11 El Capitan problem, and by using the 10.10 Yosemite system, you can avoid the underlying issue(s) somehow.

     

    In summary,

    From a Mac OS X 10.10 Yosemite, you can delete a problematic "Invalid argument" file on 10.11 El Capitan.

    From a Mac OS X 10.11 El Capitan, you cannot delete a problematic "Invalid argument" file on 10.11 El Capitan.

  • by WZZZ,

    WZZZ WZZZ Jun 17, 2016 2:31 PM in response to Dr.MORO
    Level 6 (13,087 points)
    Mac OS X
    Jun 17, 2016 2:31 PM in response to Dr.MORO

    Might be due to SIP in 10.11. Wonder if first disabling SIP on the problematic 10.10, and then booting to a 10.10 clone would work? In fact, has anyone suggested disabling SIP and then using an rm command directly?

  • by Dr.MORO,

    Dr.MORO Dr.MORO Jun 17, 2016 2:34 PM in response to WZZZ
    Level 1 (9 points)
    Mac OS X
    Jun 17, 2016 2:34 PM in response to WZZZ

    WZZZ,

    The problem occurs on a 10.11 El Capitan system, not on the 10.10 Yosemite side.

    I cannot say anything if it's the SIP issue in El Capitan. Yet, at least as said, *just* booting from a 10.10 Yosemite clone, not touching the SIP, should enable you to fix the problem in the 10.11 El Capitan.

  • by WZZZ,

    WZZZ WZZZ Jun 17, 2016 2:41 PM in response to Dr.MORO
    Level 6 (13,087 points)
    Mac OS X
    Jun 17, 2016 2:41 PM in response to Dr.MORO

    Since the OP was running 10.9 (no SIP), my second suggestion, "in fact....," doesn't make any sense.

  • by WZZZ,

    WZZZ WZZZ Jun 17, 2016 6:43 PM in response to WZZZ
    Level 6 (13,087 points)
    Mac OS X
    Jun 17, 2016 6:43 PM in response to WZZZ

    WZZZ wrote:

     

    Might be due to SIP in 10.11. Wonder if first disabling SIP on the problematic 10.10, and then booting to a 10.10 clone would work? In fact, has anyone suggested disabling SIP and then using an rm command directly?

    More likely the reverse, disabling SIP on the 10.11 clone in order to keep things aligned with your experience of being able to do it from 10.10, where there is no SIP.

  • by Eric Root,

    Eric Root Eric Root Jun 18, 2016 7:37 AM in response to Kai Vermehr
    Level 9 (69,996 points)
    iTunes
    Jun 18, 2016 7:37 AM in response to Kai Vermehr

    Trash FAQ    

     

    Trash won’t empty     

  • by Dr.MORO,

    Dr.MORO Dr.MORO Jun 18, 2016 7:48 AM in response to Eric Root
    Level 1 (9 points)
    Mac OS X
    Jun 18, 2016 7:48 AM in response to Eric Root

    Thanks for the info, Eric Root.

     

    Yet, I have read all of this thoroughly before, tried all of them, and NONE of this solved my "Invalid argument" problem, unable to delete the problematic files.

    Yes, they were helpful to narrow down what to do/not to do, but nothing directly worked.

    Only when I did as I've posted above, I was successful to delete these problematic files.

  • by melofr,

    melofr melofr Aug 4, 2016 7:02 AM in response to Dr.MORO
    Level 1 (4 points)
    Aug 4, 2016 7:02 AM in response to Dr.MORO

    Hello,

    Sorry for my English.

    I too the same problem, and this character ␀was created by Dropbox. I hope someone will find a solution.

    Thanks

Previous Page 2