Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Unification of Directories (their contents)

by graff (Chancellor)
on Apr 26, 2009 at 04:09 UTC ( [id://760088]=note: print w/replies, xml ) Need Help??


in reply to Unification of Directories (their contents)

If I understand it correctly, "cp -a" is linux/gnu only -- bsd (including freebsd and macosx) don't have a "-a" option for "cp" (though other options in combination will give the same result).

Note that your usage (cp -a D[12]/* Dd/) will take the "depth 1" contents in ascii-betic order, and deeper contents in "arbitrary" (directory content) order, so in any case, file age doesn't enter into the logic.

If there might be path/name collisions among the source directories, where differences of age and content matter, you might look at "rsync" (for which you'll find perl modules on CPAN, in case that helps, but you'll probably need to grok the rsync command-line tool options anyway, so try "man rsync").

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://760088]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-24 02:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found