On 2007-11-01 at 23:50 -0400, Chris Devers wrote:
>     $ cd ~/Movies/NOVA
>     $ find . | grep '\.txt$'  # just to skim the list & be sure...
>     $ rm */*/*.txt
> 
> Hm? 
> 
> Then repeat the `find . | grep ...` to verify you got them all. 
> 
> If there's some another level down, no problem:
> 
>     $ rm */*/*/*.txt

zsh% rm **/*.txt

Want to chase symlinks?

zsh% rm ***/*.txt

Only those older than 7 days?

zsh% rm **/*.txt(m+7)

Want to not have to worry about the length of argv?  (Thank you, Unix)

zsh% zmodload zsh/files
zsh% rm **/*.txt
zsh% type rm           
rm is a shell builtin

Now, that's not to say zsh is sweetness and light.  It tends towards
being write-only.  There are ... a plethora of options.  But it's less
hate-worthy than the alternatives (and fairly easy to hack on to reduce
hate).

Reply via email to