[plug] Recursive Copying of Folder Contents

Lyndon Maydwell maydwell at gmail.com
Thu Jun 4 13:32:58 WST 2009


If you're using zsh there's a nice recursive glob and plain file
specifier you can use:
base-directory/**/*(.)

and to avoid the max args issue:

for i in base-directory/**/*(.)
do
     cp "$i" destination/
done

On Thu, Jun 4, 2009 at 1:09 PM, garry <garbuck at westnet.com.au> wrote:
>
>>  cp Music/{A-D}*/*/*  common-folder
>
> It's interesting to see the flexibility of bash! I had no idea you could
> break up commands with subsets of letters..
>
> One that's stumped me (and would be really useful) is getting multiple goes
> at command memory..
>
> e.g. When you press *up* to retrieve a previous command, being able to do it
> again after each "&&".
>
> Garry
> _______________________________________________
> PLUG discussion list: plug at plug.org.au
> http://www.plug.org.au/mailman/listinfo/plug
> Committee e-mail: committee at plug.linux.org.au
>



More information about the plug mailing list