[olug] find a -d 1 -type d -exec cp -R {} b/ \;

Kevin sharpestmarble at gmail.com
Sun Feb 13 06:51:21 UTC 2011


When find comes up with a file, it will run the given command once for
each file that is located. The filename that it is working with right
now is substituted in place of the curly braces.

On Sun, Feb 13, 2011 at 00:31, Rob Townley <rob.townley at gmail.com> wrote:
>
> > 18:05 < jhannah> find a -d 1 -type d -exec cp -R {} b/ \;
> > 18:05 < jhannah> substitute a for whatever your source directory is and b for whatever your target directory is
>
> find is nice for that.  Do the curly braces {} denote a parameter
> passed from find?
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> https://lists.olug.org/mailman/listinfo/olug



More information about the OLUG mailing list