Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!sun!snafu!lm From: lm@snafu.Sun.COM (Larry McVoy) Newsgroups: comp.unix.wizards Subject: Re: How to delete a file with ^? chars in the name? Message-ID: <130045@sun.Eng.Sun.COM> Date: 9 Jan 90 21:44:45 GMT References: <7711@unix.SRI.COM> Sender: news@sun.Eng.Sun.COM Reply-To: lm@sun.UUCP (Larry McVoy) Organization: Sun Microsystems, Mountain View Lines: 39 In article <7711@unix.SRI.COM> ubi@ginger.sri.com (Ron Ueberschaer x4399) writes: >I have a file which is named ^?^?^?H01.b (delete character?) and can't >find a way to delete it. An ls -s on the directory produces: > > .. ... (other files) > 1 ???H01.b > >If I do an ls *.b, it lists the other .b files, but complains: > > H01.b not found > >I've tried: > > rm -i * (to selectively delete everything) > rm "???H01.b" > rm "^v^?^v^?^v^?H01.b" (control-v delete ...) > >and nothing seems to work. $ cat > xxx.c #include main() { char buf[255]; while (gets(buf)) if (unlink(buf)) perror(buf); } ^D $ cc xxx.c $ a.out ????H01.b ^D --- What I say is my opinion. I am not paid to speak for Sun, I'm paid to hack. Larry McVoy, Sun Microsystems (415) 336-7627 ...!sun!lm or lm@sun.com