[ILUG] HD question

Rick Moen rick at linuxmafia.com
Thu Mar 22 18:15:06 GMT 2001


begin Donncha O Caoimh quotation:

> What's so bad about using "cp -avf" instead, except for the possibility
> that "cp" on the platform in question may not support "-av" of course?

Ordinarily, one would want at least to also use -x (to not
accidentally copy filesystems mounted within the tree to be copied).  
It's a good habit to get into, otherwise you'll some day try to copy
/ , and end up (among other things) trying to cp /proc .

GNU cp has the disadvantage of incrementing files' time stamps.  (You
might wish to keep those intact.)  It doesn't handle sparse filesystems
very intelligently (even if you include option --sparse=always).  You
might thus prefer to trust other tools with your data.

I'd personally go with "rsync -avz source destination" for routine
cases.  Or "(cd source && 'tar Sczpf -) | (cd destination && tar Sxvzpf -)" ,
as long as I'm sure I'm using the GNU version of tar. 

More at:
http://www.custhelp.com/cgi-bin/varesearch/solution?11=010228-0000&130=0983415877


-- 
Cheers,                                      Right to keep and bear
Rick Moen                                  Haiku shall not be abridged
rick at linuxmafia.com                           Or denied.  So there.




More information about the ILUG mailing list