Since the characters are likely international characters, they likely are appearing as control codes in your en_US character set, which is why ls is showing them as question marks.
This may be due to your distribution's choice of alias'ing ls by default in the global profile. For example:
alias ls='ls -q'
You can see if your distribution has done so by typing into your shell:
alias ls
Which will print out something like the following:
$ alias ls
alias ls='ls --color=auto'
The page linked below suggests that if you do "ls -b", you will see the octal control codes so you know at least what characters are in use.
http://www.arsc.edu/arsc/support/howtos/nonprintingchars/
Assuming that doesn't work you have another option also mentioned there nearer to the bottom:
A tool I was unaware of until now called OctalDump (on Debian -- /usr/bin/od)
$ ls | od -b
Will show you the octal form of the control codes.
$ ls | od -c
Will show you the characters including any hidden additional whitespace that might be at the end (note the extra spaces on the end in their example)
Once you know what control characters are in play and whether there is additional hidden whitespace, you may be able to finagle a way to cd to the directory by escaping the control characters. Failing that, you have a couple of options for renaming the directory.
The page above also, conveniently, has a quick and dirty method for removing the control characters via the mv command, which I think will work, so long as you DO escape the space, but DONT escape the question marks (thusly making them single character wildcards), and so long as nothing else exists in the directory where this rogue directory is. The reason for these explicit requirements is because you're using only wildcard characters and the single space, and so you don't want the wildcard to inadvertently match any other file or directory.
If the above method does not work, you can almost assuredly use the find method mentioned by other responses, in a different way. Rather than trying to cd to the directory using the inode number, which is what you said you have tried, you can rename it using the inode number. Just be sure to copy the entire set of 3 lines for that one command from the page above (replace the "desired-name" part with the actual name you want to rename it to however).
Once the directory is renamed, then you should be able to access it. I can only hope that it doesn't also contain files with control codes in the names, or you will have to rinse and repeat for every file (and/or subdirectory) in the directory you just renamed, at which point a for loop would probably be wise to just name every file as a number, by incrementing from 1. :-)
cd */
might work.*
should expand a shell understandable description of the directory, andcd
ignores extra arguments. Another way might be to use a graphical file manager (including the terminal based MC) or the built-in file tree navigators in e.g. Vim. You can also experiment with the-exec
switch tofind, not with
cd` directly (which is a shell built-in) but with e.g.ls
and other tools.cd
with multiple arguments fails.too many arguments
".