delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/08/11:16:40

Date: Fri, 8 Oct 1999 14:27:13 +0200
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Message-Id: <199910081227.OAA04438@acp3bf.physik.rwth-aachen.de>
To: rg3 AT ic DOT ac DOT uk (Ya'qub)
Cc: djgpp AT delorie DOT com
Subject: Re: Remove contents of directories recursively
Newsgroups: comp.os.msdos.djgpp
Organization: RWTH Aachen, III. physikalisches Institut B
X-Newsreader: TIN [version 1.2 PL2]
Reply-To: djgpp AT delorie DOT com

In article <37fdd3e4 DOT 0 AT nnrp1 DOT news DOT uk DOT psi DOT net> you wrote:
[...]
> Unfortunately, it only deletes the *.obj files that are in the the top level
> directory but not those found in sub-directories further down. Can anyone
> tell me how to do this (if possible)?

With the djgpp version of 'rm' that's simple:

	rm .../*.obj

(not the *triple* dots). The more conventional, Unix-like method would
be using 'find' and 'xargs':

	find . -name '*.obj' -exec rm {} ;

or (a bit faster): 

	find . -name '*.obj' | xargs rm 

--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019