[PLUG] Moving in to the new partitions

Russell Senior seniorr at aracnet.com
Sun Dec 28 16:05:03 UTC 2003


>>>>> "Fedor" == Fedor Pikus <fedorp at wv.mentorg.com> writes:

Fedor> cp -a preserve permissions and ownership, so does tar: cd /usr;
Fedor> tar cf - . | ( cd /new/usr; tar xf - )

If you are using GNU tar (if on linux, you almost certainly are), then
you can use its whiz-bang features, e.g.:

  tar -C /usr -cl . | tar -C /new/usr -xpv

a) the -C option changes the effective current-working-directory for
   its associated instance of tar.

also:

b) I used the -l option on the left side to limit to one filesystem.

c) I left off the -f option on both sides because stdout/stdin are the
   defaults.

d) I added the redundant -p out the right side just for emphasis.  It
   is on by default when run by root.

-- 
Russell Senior         ``I have nine fingers; you have ten.''
seniorr at aracnet.com




More information about the PLUG mailing list