Funny file names

Duane Morse duane at anasazi.UUCP
Wed May 15 00:16:58 AEST 1985


> By mistake I created a file called ^G (ctl-G) from readnews.  When
> went back to the csh, I did an `ls' and it told me that I had file
> called `?'.  When I tried to `rm ?' it wouldn't go away.  However,
> I tried `rm ^G', that worked.  I think this is kind of strange.
> 
> What happens if one (by mistake) creates a file called `ctl-foo' and one
> didn't know that this was happening.  The next time they did an `ls'
> of that directory they'd get a `?' and it would be impossible to remove
> because they don't know the name.
> 
Most computer systems, large and small, allow one to create bizarre
file names, and all programmers accidentally create a file with a
bad name at some time or another. To see the file names in all
their glory, use "od -c .". You should be able to spot the rotten fish
among the good files. Before removing the file, however, be sure to
do an ls using the funny name to make sure that just typing the
name doesn't result in the shell expanding it to something else.
If that happens, you can either play games with character substitution
using ? or * until only the file you want turns up, or you can delete
the file by its i-node number.
-- 

Duane Morse	...!noao!terak!anasazi!duane
(602) 275-0302



More information about the Comp.unix mailing list