[plug] Recursive Copying of Folder Contents

Andrew Furey andrew.furey at gmail.com
Thu Jun 4 11:22:51 WST 2009


On 04/06/2009, Jason Posavec <jasonposavec at iinet.net.au> wrote:
> > $ cp Music/*/*/*  common-folder /
>
>  That would only copy files, and not folders? If so, it proves that the best
> solutions are always the simplest and most elegant. At first glance, that
> command looks like it would copy *everything* in the 3 folders under Music,
> not just the files.

Actually it'll copy everything in the-3-folders-under-Music, not the
ones in the levels above. You're thinking of:

$ cp Music/* Music/*/* Music/*/*/* common-folder

Andrew

-- 
Linux supports the notion of a command line or a shell for the same
reason that only children read books with only pictures in them.
Language, be it English or something else, is the only tool flexible
enough to accomplish a sufficiently broad range of tasks.
                          -- Bill Garrett



More information about the plug mailing list