Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!princeton!phoenix!pfalstad From: pfalstad@phoenix.princeton.edu (Paul Falstad) Newsgroups: comp.unix.questions Subject: Re: Problems with rm -f Message-ID: <46853@localhost.Princeton.EDU> Date: 14 May 91 21:20:06 GMT References: <1991May14.190816.17169@rodan.acs.syr.edu> Sender: gnus@idunno.Princeton.EDU Distribution: usa Organization: League For Fighting Chartered Accountancy Lines: 26 >% rm -f .Mail/drafts/,* Remove the , files (temp files) >% All okay! :) > >% rm -f .Mail/drafts/,* Do it again, _problems!_ >No match. >% >---------------- > >What the heck is the -f option there for if it still throws up at you >if files in a sub-directory don't exist? It works fine if you are _in_ >a that directory (i.e. 'rm -f ,*' run twice in the sub-directory >suppresses errors correctly) csh handles the * expansion, not rm; it's csh that's complaining that there are no matches for ",*". So in the second case, rm is never even executed. The -f flag is useless in either case, because the shell would never pass the names of nonexistent files along to rm (because you are using globbing). I have no idea why this worked if you were in the directory. Do something like "rm .Mail/drafts/,* >& /dev/null", or use a different shell. -- Paul Falstad | 10 PRINT "PRINCETON CS" pfalstad@phoenix.princeton.edu | 20 GOTO 10