Re: Copy EVERYTHING

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05Dec2006 15:54, joe@xxxxxxxxxxxxxxxxx <joe@xxxxxxxxxxxxxxxxx> 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:-)

| >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.

BTW, if using "rsync -a", make sure you add "-H" as well; -a does not
include it.
-- 
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

Heaven could change from chocolate to vanilla without violating perfection.
        - arromdee@xxxxxxxxxxxxxxxxxxxxx (Ken Arromdee)


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux