Some versions of UNIX have a lot of trouble with eight-bit filenames - that
is, filenames that contain non-
command shows the non-ASCII characters as question
), but usual tricks like
rm -i *
skip right over the file.
You can at least see exactly what the filename is by using
to dump the current directory, using its relative pathname
character by character.
(Note: some versions of UNIX have an
option that will do the same
thing as od -c
, but a lot more easily.)
rm -i *
od -c .
00..... \t 360 207 005 254 \0 \0 \0 \0 ...
If you can move all the other files out of the directory, then you'll
probably be able to remove the leftover file and directory with
Moving files and removing the directory is a bad idea, though, if this
is an important system directory like /bin
Otherwise, if you can find the filename in the od
listing of the
directory (it will probably end with a series of NUL characters,
\0 \0 \0
...), you might be able to remove it directly
by using the system call unlink
(2) in Perl.
Put a backslash (
) before each of the octal bytes shown in
perl -e 'unlink("\t\360\207\005\254");'
If you don't have Perl, write
a little C program (52.8
will tell you whether your program worked (there
probably won't be any error messages if it doesn't work).