Messages in this thread | ![/](/images/icornerl.gif) | | Subject | Re: Duplicating a file system | Date | Sun, 10 Mar 1996 12:44:01 -0500 | From | Drew Sullivan <> |
| |
In message <Pine.LNX.3.91.960309093124.145A-100000@marvin.mars.org>, Bill Power s writes: > On Fri, 8 Mar 1996, Joel Young wrote: > > This will also work: Assuming the partitions are mounted as /From/Dir and > /To/Dir: > > (cd /From/Dir ; tar cf - . ) | (cd /To/Dir ; tar xvfp - )
***NEVER*** do this use this instead: umask 0 # tar honours umask (cd /From/Dir && tar clf - . ) | (cd /To/Dir && tar xpf - ) ^^ ^^ Note the double &&. If the cd fails then the tar doesn't run. Otherwise you have the potential of mangling either the source tree or the destination tree.
-- -- Drew Sullivan, <drew@ss.org> -- Toronto, Canada, +1-416-225-1592 "Intel Inside" isn't advertising. It's a warning!
| ![\](/images/icornerr.gif) |