- To: slug@xxxxxxxxxxx
- Subject: Re: [SLUG] Moving multiple files....
- From: Martin Pool <mbp@xxxxxxxxxxxxxx>
- Date: Thu, 20 Apr 2006 14:48:52 +1000
- User-agent: Mutt/1.5.11
On 17 Apr 2006, Benno <benjl@xxxxxxxxxxxxxxx> wrote:
> If you are using zsh, it has a neat feature where you can glob down multiple
> directories. E.g:
>
> mv /photos/**/*.jpg /newphotos
>
> Will match all .jpg files under photos. But you will end up with all those jpgs
> in the one directory which is probably not what you want. Another problem is that
> you can only have so many arguments on the command line, and if your photo collection
> is large that won't work.
A related neat zsh trick is
for i in *.JPG; do mv -v $i ${i:l}; done
to squash everything to lowercase, which can be nice when they're coming
from a flash card onto Unix.
--
Martin