Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!lll-winken!arisia!quintus!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: <130103@sun.Eng.Sun.COM> Date: 10 Jan 90 23:13:13 GMT References: <7711@unix.SRI.COM> <130045@sun.Eng.Sun.COM> <1990Jan10.143111.3446@virtech.uucp> Sender: news@sun.Eng.Sun.COM Reply-To: lm@sun.UUCP (Larry McVoy) Organization: Sun Microsystems, Mountain View Lines: 37 In article <1990Jan10.143111.3446@virtech.uucp> jje@virtech.uucp (Jeremy J. Epstein) writes: >In article <130045@sun.Eng.Sun.COM>, lm@snafu.Sun.COM (Larry McVoy) writes: >> 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 >> > >> >> $ 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 > >Unfortunately this won't work since the shell is responsible >for expanding the ? and * wildcard characters, not the kernel >(just for fun, consider implementing a shell which used different >wildcard characters...it's only confusing to the user). You're out of your mind. The shell does not come inbetween a the keyboard and gets(). --- 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