🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.unix.shell
4 messages
4 total messages Started by hao zhou Sat, 20 Oct 1990 00:55
recursively deleting *.dvi files
#1552
Author: hao zhou
Date: Sat, 20 Oct 1990 00:55
9 lines
682 bytes
I want to write some script for deleting *.dvi files recursively in
all my subdirectories but I haven't got any idea yet. Can somebody
shed some light on this?

	-- HaoZ.

-- 
Internet:haozhou@acsu.buffalo.edu BITNET:haozhou%acsu.buffalo.edu@UBVM.BITNET
UUCP: uunet!acsu.buffalo.edu!haozhou
Re: recursively deleting *.dvi files
#1551
Author: Rouben Rostamian
Date: Sat, 20 Oct 1990 01:39
12 lines
990 bytes
In article <41724@eerie.acsu.Buffalo.EDU> haozhou@acsu.buffalo.edu (hao zhou) writes:
 >I want to write some script for deleting *.dvi files recursively in
 >all my subdirectories but I haven't got any idea yet. Can somebody
 >shed some light on this?
 >

Not need for a script.  To delete *.dvi files in the current directory 
and all its subdirectories, do:

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

--
Re: recursively deleting *.dvi files
#1563
Author: Sean Fulton
Date: Sun, 21 Oct 1990 15:10
14 lines
803 bytes
In article <41724@eerie.acsu.Buffalo.EDU> haozhou@acsu.buffalo.edu (hao zhou) writes:
>I want to write some script for deleting *.dvi files recursively in
>all my subdirectories but I haven't got any idea yet. Can somebody
>shed some light on this?
>

Try:
	find . -name `*.dvi` -print -exec rm -f {} \;


-- 
Sean Fulton					sean@utoday.com
UNIX Today!					(516) 562-5430
 /* The opinions expressed above are not those of my employer */
Re: recursively deleting *.dvi files
#1564
Author: 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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads