🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #1564

Re: recursively deleting *.dvi files

#1564
From: Jonathan I. Kamens
Date: Sun, 21 Oct 1990 19:26
27 lines
1509 bytes
In article <1828@utodaycom>, sean@utodaycom (Sean Fulton) writes:
|> Try:
|> 	find . -name `*.dvi` -print -exec rm -f {} \;

  Backquotes won't do the right thing in any of the shells I've used.

  Backquotes are for command evaluation and output substitution, not for
wildcard quoting.  The command above will try to run a command called "*.dvi",
which will obviously fail.  Try:

	find . -name '*.dvi' -print -exec rm -f {} \;

Or, if you know there aren't that many of them, try:

	rm -rf `find . -name '*.dvi' -print`

Or, if you are unsure how many of them there are and you have xargs (and you
aren't worried about the xargs security holes that have been discussed
recently being present in your home directory :-):

	find . -name '*.dvi' -print | xargs rm -f

-- 
Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik@Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8085			      Home: 617-782-0710
Technical Details
Message-ID: <1990Oct21.192643.503@athena.mit.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!swrinde!ucsd!ucbvax!bloom-beacon!athena.mit.edu!jik
References: <41724@eerie.acsu.Buffalo.EDU> <1828@utodaycom>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!swrinde!ucsd!ucbvax!bloom-beacon!athena.mit.edu!jik
From: jik@athena.mit.edu (Jonathan I. Kamens)
Newsgroups: comp.unix.shell
Subject: Re: recursively deleting *.dvi files
Message-ID: <1990Oct21.192643.503@athena.mit.edu>
Date: 21 Oct 90 19:26:43 GMT
References: <41724@eerie.acsu.Buffalo.EDU> <1828@utodaycom>
Sender: daemon@athena.mit.edu (Mr Background)
Reply-To: jik@athena.mit.edu (Jonathan I. Kamens)
Organization: Massachusetts Institute of Technology
Lines: 27