[rescue] Doh!

Greg A. Woods woods at weird.com
Wed Oct 9 12:45:58 CDT 2002


[ On Wednesday, October 9, 2002 at 10:36:20 (+0200), Walter Belgers wrote: ]
> Subject: Re: [rescue] Doh!
>
> Dave McGuire wrote:
> > 
> >    You really want to use a tar pipeline for stuff like that 
> > anyway...much safer than cp.
> > 
> > # cd <src>
> > # tar -cf - . | (cd /<dest>; tar -xvBpf -)
> 
> You really really want a cpio.

No, not on FreeBSD you certainly do not want to use "cpio", and you
don't really want to use "tar" either.

The correct and very best way to properly copy everything when using any
of the *BSDs is 'cp -Rp /srcdir/ /destdir/'  (the trailing slashes are
very important unless you use the 'cd /dest ; cp -Rp /src .' trick)

> Tar may have problems with devices, named pipes etc.

You'll probably have more problems with FreeBSD's "cpio" than anything
else.  I'm pretty sure they haven't fixed it yet (it's a front-end to pax)

FreeBSD's "tar" is GNU Tar (1.13.25 on 4.7-RC).  There are inherent
limitations to how big filenames and pathnames can be as defined in the
TAR standard, just as there are with the various variants of CPIO,
though with the distribution files none of those limits should be
exceeded.

-- 
								Greg A. Woods

+1 416 218-0098;            <g.a.woods at ieee.org>;           <woods at robohack.ca>
Planix, Inc. <woods at planix.com>; VE3TCP; Secrets of the Weird <woods at weird.com>



More information about the rescue mailing list