merging file sub-trees
pll at lanminds.com
pll at lanminds.com
Mon Jun 2 16:17:21 EDT 2003
In a message dated: Mon, 02 Jun 2003 15:51:24 EDT
ken at flyingtoasters.net said:
>"cp" under Linux has become somewhat powerful; the following worked fine
>for me:
>
>cp -a a c && rm -rf a
>
>Copy, recursively and with permissions, etc., retained, dir "a" into c;
>then, if the copy worked, blow away a. Note that it will overwrite your
>stuff, though I think if you have "noclobber" set, it'll prompt, though my
>recollection's somewhat hazy.
Hmmm, and I think either of the following might work as well, though
they're untested:
rsync -rav a/ c/
or
tar cvpf - a | (cd c/;tar xpf -)
both should over-write like named files.
--
Seeya,
Paul
--
Key fingerprint = 1660 FECC 5D21 D286 F853 E808 BB07 9239 53F1 28EE
It may look like I'm just sitting here doing nothing,
but I'm really actively waiting for all my problems to go away.
If you're not having fun, you're not doing it right!
More information about the gnhlug-discuss
mailing list