23.15 Using unlink to Remove a File with a Strange NameSome versions of UNIX have a lot of trouble with eight-bit filenames - that
is, filenames that contain non-
ASCII (51.3
)
characters.
The
ls -q
(16.14
)
command shows the non-ASCII characters as question
marks ( % 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 rm -rf (23.17 , 23.10 ) . 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,
like perl -e 'unlink("\t\360\207\005\254");' If you don't have Perl, write a little C program (52.8 ) : % Another ls will tell you whether your program worked (there probably won't be any error messages if it doesn't work). - |
|