Date: Mon, 13 Nov 2006 17:22:36 +0100 (CET) From: Oliver Fromme <olli@lurza.secnetix.de> To: freebsd-stable@FreeBSD.ORG, aburke@nullplusone.net, gamato@users.sourceforge.net, avg@icyb.net.ua Subject: Re: adding an extra hard disk and adding space to /usr Message-ID: <200611131622.kADGMair072567@lurza.secnetix.de> In-Reply-To: <4554B8E3.1050604@icyb.net.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
Andriy Gapon wrote: > Oliver Fromme wrote: > > Aaron Burke wrote: > > > SNIP > > > > > (FreeBSD 4.x) : cd /usr; tar clpf - . | (cd /mnt; tar xvf -) > > > > > (FreeBSD 5.x+) : cd /usr; gtar clpf - . | (cd /mnt; gtar xvf -) > > > > iirc tar(1) has changed in 5.3. why do you use gtar please? is new tar > > > > missing something? > > > Well, technically no, but it requires more typing. > > > > That's why I prefer to use cpio: > > > > cd /usr; find -dx . | cpio -dump /mnt > > > > which works on _any_ version of FreeBSD out of the box. > > $ pax rw /usr /mnt > is even less typing and works on any system with POSIX-compliant > utilities :-) For certain definitions of "works". :-) At the very least you have to add "-p e" (preserve UID/GID and file mode). And if you don't use it for local copy mode, you have to remember to add "-x cpio", or otherwise it won't copy long path names correctly. I like the find|cpio combination for the great flexibility that find(1) provides. And while cpio isn't in the current POSIX standard (neither is tar, FWIW), it's present on all UNIX systems that I'm using. It's also important to know that pax doesn't preserve file flags (cpio neither, though). To make a real 1:1 copy including file flags, cpdup is easy to use and efficient (ports/sysutils/cpdup). Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "To this day, many C programmers believe that 'strong typing' just means pounding extra hard on the keyboard." -- Peter van der Linden
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611131622.kADGMair072567>