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

Re: rm -r



*.o is interpreted by zsh as: expand all the filnames in the current
directory matching '*.o' and the pass these as arguments to 'rm' which isn't
what you want (try pressing <tab> to see the expansion).

If there are a small number of files try:
  rm -f **/*.o
or if the expansion will result in more file names than can be passed on the
command line:
  find . -name '*.o' | xargs rm -f

-pascal


Claus Alboege wrote:

> Hi,
>
> Could anyone tell me a way to make the following work from a z-shell:
>
> rm -rf *.o (this dosn't work)
>
> 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.
>
> --
>  Claus Alboege
begin:vcard 
n:Byrne;Pascal
tel;fax:353 1 8039101 
tel;work:353 1 8039066
x-mozilla-html:FALSE
org:Oracle;WPTG
version:2.1
email;internet:pbyrne@xxxxxxxxxxxxx
adr;quoted-printable:;;Block 3,=0D=0AEast Point business park,=0D=0ADublin 3.;;;;Ireland
fn:Pascal Byrne 
end:vcard


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