I am trying to delete a folder in my home directory; its name is completely garbled. In Nautilus, the garbled text is followed by 'Invalid Directory.'

Deleting it with Nautilus stalls; I can't type in the garbled name in the terminal.

peter@io_vbox:~$ ls -lbdR *
drwxrwxr-x 3 peter peter      4096 Jul 28 15:19 \346>\3152\357+\332)\363*\356,\253-\277+H&\266\033z\v\373\366\340\340?\314\022\274P\262\003\260鵿\303p\326\342\351\214\374f\016X\036r)!.\026

Any ideas?

Running 12.04; if it's of any importance, this is running in VirtualBox on a Macbook Air. It was installed through VirtualBox. I don't have any other signs of SSD failure that I've picked up on -- referring to this question: Random files (invalid encoding) appearing in home directory


  • 1
    What do you mean by "this is emulated in VirtualBox" - do you have a clone of your machine or another virtual machine and those files also appear there? – Sergey Aug 31 '12 at 0:11
  • 1
    @Peter, Please can you post the output from ls -ldR * while in your home dir and post the line with the directory in question? – Sparky Aug 31 '12 at 0:44
  • @Sergey, Thanks for the feedback; it's not a clone. This only concerns one installation. – Peter Becich Aug 31 '12 at 0:44

When a file / dir has special characters and won't delete, you can try to remove it using it's inode number more information on inodes in ext3.

To do so,

  1. open a terminal window.
  2. Change directory cd to the location of the files or directories with the "special characters".
  3. Run

    ls -lbdRi *
    1312883 drwxrwxr-x 2 me me 4096 Aug 31 11:49 special-character`

    Note the "inode" number (Here 1312883)

  4. Then run a find and remove on that "inode"

     find . -inum 1312883 -exec rm -rf {} \;
     find: ``./special-character': No such file or directory
  5. and then to make sure that is has gone.

     ls -lbdRi *
     ls: cannot access *: No such file or directory

I hope that this helps.

  • 1
    Awesome! It worked. How did you manage to replicate my problem, to solve it? Thanks – Peter Becich Sep 2 '12 at 0:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.