Copy EVERYTHING

Mike McCarty Mike.McCarty at sbcglobal.net
Tue Dec 5 23:59:39 UTC 2006


Cameron Simpson wrote:
> On 05Dec2006 15:54, joe at illegal-access.de <joe at illegal-access.de> wrote:
> | >> On Tue, 2006-12-05 at 10:18 +0800, Hadders wrote:
> | >> >  > cd /oldpart;  find . -xdev | cpio -padm /newpart
> | >The cpio command doesn't preserve the timestamp on directories.
> 
> Who cares? Directory timestamps change all the time:-)

Erm...

Apparently he does.

> 
> | >The tar version does:
> | >cd /oldpart
> | >tar cvf - . | ( cd /newpart ; tar xf -)
> | 
> | I thought, that a "cp -a" would do the same....
> 
> True. But a pair of cpios or tars pipes together is faster.
> And "cp -a" almost certainly breaks hard links. You'd start with one
> file with two names in the original and end up with two separate files
> in the copy. Ugh.

Is there an archive format which does handle links properly? I'm talking
about being able to store stuff on CDROM and get it back.

> BTW, if using "rsync -a", make sure you add "-H" as well; -a does not
> include it.

Mike
-- 
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!




More information about the fedora-list mailing list