find and cp with directory structure.
David Shochat
david.shochat at gmail.com
Mon Oct 24 12:12:57 UTC 2011
On Mon, Oct 24, 2011 at 7:47 AM, Steve Flynn <anothermindbomb at gmail.com> wrote:
> On 24 October 2011 12:00, David Shochat <david.shochat at gmail.com> wrote:
>
>>
>> Perl's File::Find module is great for this sort of thing, assuming you
>> know Perl.
>
>
> You think the File:Find module can be used to create parent directories?
Of course you can create directories in Perl. You can do anything in
Perl that can be done in the shell.
It should be pointed out that the question and its solutions are
equally applicable to all Unix-like systems, including MacOSX, so
maybe another forum...
It is probably possible to do it with the find command, and I'm going
to investigate the --parents switch that you mention since that's new
to me. I've just found that many things that are tricky with find are
much more straightforward (and in some cases run much faster) using
File::Find.
-- David
More information about the ubuntu-users
mailing list