Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!ucsd!sdcsvax!ucsdhub!sdsu!mmcp From: mmcp@sdsu.UUCP ( mmcp) Newsgroups: comp.sys.hp Subject: Re: Trying to remove a file called "-ls" Message-ID: <3588@sdsu.UUCP> Date: 26 Mar 89 02:33:19 GMT References: <570@sdrc.UUCP> <4640014@hpirs.HP.COM> Reply-To: mmcp@sdsu.UCSD.EDU ( mmcp) Organization: San Diego State University, Math/Sciences Dept. Lines: 10 In article <4640014@hpirs.HP.COM> wk@hpirs.HP.COM (Wayne Krone) writes: >> Why not rm -i * and answer no to all the queries except -ls? > >Because * is expanded by the shell so the argument list passed to >rm might be "-i -ls foo1 foo2". Why not simply write a C program which uses the unlink system call to purge the file? Syd Logan mmcp San Diego State University