From owner-freebsd-current@FreeBSD.ORG Wed Mar 30 19:55:02 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 355CF16A4CE for ; Wed, 30 Mar 2005 19:55:02 +0000 (GMT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0458F43D1F for ; Wed, 30 Mar 2005 19:55:02 +0000 (GMT) (envelope-from julian@elischer.org) Received: from [208.206.78.97] (julian.vicor-nb.com [208.206.78.97]) by mail.vicor-nb.com (Postfix) with ESMTP id CA0E77A41E; Wed, 30 Mar 2005 11:55:01 -0800 (PST) Message-ID: <424B0415.2070407@elischer.org> Date: Wed, 30 Mar 2005 11:55:01 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050218 X-Accept-Language: en, hu MIME-Version: 1.0 To: Stephen McKay References: <20050327223238.GA749@polands.org> <010401c53385$584a04c0$6800000a@venti> <20050329041527.GA9586@VARK.MIT.EDU> <20050329062550.GA69824@cirb503493.alcatel.com.au> <200503301139.j2UBdMp5016442@dungeon.home> In-Reply-To: <200503301139.j2UBdMp5016442@dungeon.home> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: Peter Jeremy cc: "Brian K. White" cc: freebsd-current@freebsd.org Subject: Re: Heads up: gtar gone from base system X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2005 19:55:02 -0000 Stephen McKay wrote: >On Tuesday, 29th March 2005, Peter Jeremy wrote: > > > >>Brian missed a pair of parenthenis. The example should read: >> >>( cd srcdir ; tar cf - . ) | ( cd destdir ; tar xpf - ) >> >> > >Tar is indeed a most excellent program for copying directory trees, since >even in this modern century cp fails to correctly handle hard links. Sigh. > > I find "find -depth |cpio -pdmuv" is better because it has the option of being run as: find -depth |cpio -pdmv which will only update new files . this is excelent if you stop it half way through for some reason and want to continue the copy.. good if you want to keep one tree in sync with another. also find -depth |cpio -pdlmuv is good if you want a 'linked' copy of a directory where all the files are hardlinks of the original. >Still, if you are using tar, be sure to use it correctly: > >( cd srcdir && tar cf - . ) | ( cd destdir && tar xpf - ) > >You don't want it going off in the current directory and mangling things >just because of a little typo in a directory name. > >Stephen. > >PS If I'm right, the new tar fixes something gtar got wrong: setting >permissions on "." when it is part of the archive, which of course it is >when you copy directories in this way. This may surprise new users, even >though it is the only sensible result. > >PPS Who's for adding a "cp -h" option to copy preserving hard links? >_______________________________________________ >freebsd-current@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-current >To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > >