[plug] Recursive Copying of Folder Contents
Lee Standen
standen at staff.iinet.net.au
Thu Jun 4 13:42:58 WST 2009
fc is a very useful command too...
Every had a 5 line one-liner that you made some typo right at the start? Fc will open up the last command in $EDITOR and let you make changes to it :)
Ya might already know about it, but I didn't until recently, and I've been using linux for ages :)
-----Original Message-----
From: plug-bounces at plug.org.au [mailto:plug-bounces at plug.org.au] On Behalf Of Lyndon Maydwell
Sent: Thursday, 4 June 2009 1:33 PM
To: plug at plug.org.au
Subject: Re: [plug] Recursive Copying of Folder Contents
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
>
_______________________________________________
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