From owner-freebsd-stable@FreeBSD.ORG Mon Nov 13 16:24:32 2006 Return-Path: X-Original-To: freebsd-stable@FreeBSD.ORG Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0F41216A4EE for ; Mon, 13 Nov 2006 16:24:32 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 47E2F43E00 for ; Mon, 13 Nov 2006 16:23:11 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (jktuxo@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id kADGMfiP072568; Mon, 13 Nov 2006 17:22:46 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id kADGMair072567; Mon, 13 Nov 2006 17:22:36 +0100 (CET) (envelope-from olli) Date: Mon, 13 Nov 2006 17:22:36 +0100 (CET) Message-Id: <200611131622.kADGMair072567@lurza.secnetix.de> From: Oliver Fromme To: freebsd-stable@FreeBSD.ORG, aburke@nullplusone.net, gamato@users.sourceforge.net, avg@icyb.net.ua In-Reply-To: <4554B8E3.1050604@icyb.net.ua> X-Newsgroups: list.freebsd-stable User-Agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (FreeBSD/4.11-STABLE (i386)) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Mon, 13 Nov 2006 17:22:47 +0100 (CET) Cc: Subject: Re: adding an extra hard disk and adding space to /usr X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-stable@FreeBSD.ORG, aburke@nullplusone.net, gamato@users.sourceforge.net, avg@icyb.net.ua List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2006 16:24:32 -0000 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