Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: rm -r



On Mon, Dec 20, 1999 at 05:28:20PM +0100, fg wrote:

> > What I want is to remove all .o files recursive , but the "-r switch" in
> > the above isn't a correct way to do it.
> > 
> 
> find -type f -name "*.o" -exec rm -f {} \;
> 
> Or:
> 
> rm -f **/*.o with zsh's goodies, But you'll get a "blah.o: is a
> directory" message if you have directories which names end with ".o"

    rm -f **/*.o(^/) will work if you've doing 'setopt EXTENDED_GLOB', too. 
(That'll remove all files which end in .o recursively, and exclude all *.o
files which are directories).


-- 
: Andre Pang <andrep@xxxxxxxxxxx> - Purruna Pty Ltd - ph# 0411.882299 :
:               #ozone - http://www.vjolnir.org/ozone/                :



Messages sorted by: Reverse Date, Date, Thread, Author