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


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
tel;fax:353 1 8039101 
tel;work:353 1 8039066
adr;quoted-printable:;;Block 3,=0D=0AEast Point business park,=0D=0ADublin 3.;;;;Ireland
fn:Pascal Byrne 

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