From owner-freebsd-current@FreeBSD.ORG Tue Mar 29 07:36:20 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 AA38116A4CE for ; Tue, 29 Mar 2005 07:36:20 +0000 (GMT) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C52F43D58 for ; Tue, 29 Mar 2005 07:36:20 +0000 (GMT) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by cs1.cs.huji.ac.il with esmtp id 1DGBGs-000BPH-6z; Tue, 29 Mar 2005 09:36:18 +0200 X-Mailer: exmh version 2.7.0 06/18/2004 with nmh-1.0.4 To: sthaug@nethelp.no In-Reply-To: Message from sthaug@nethelp.no of "Tue, 29 Mar 2005 09:12:32 +0200." <12938.1112080352@bizet.nethelp.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 29 Mar 2005 09:36:18 +0200 From: Danny Braniss Message-ID: cc: brian@aljex.com 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: Tue, 29 Mar 2005 07:36:20 -0000 > > Brian missed a pair of parenthenis. The example should read: > > > > ( cd srcdir ; tar cf - . ) | ( cd destdir ; tar xpf - ) > > All the first perens does is leave you sitting wherever you were before > starting, whereas my example would have left you sitting in srcdir. > It makes no functional difference in the tar/untar job itself. > > In truth, my example was from something I do all the time on SCO and is in > sco's tar man page but it's such basic shell and tar usage that it works the > same everywhere. I do it on Linux and FreeBSD too and I just verified on a > 5.3 box just to make sure instead of relying on memory and common sense. > It's still in my fingers too, used it for many years. Lately I have > been using cp -pR for the same job. caution: -R If source_file designates a directory, cp copies the directory and the entire subtree connected at that point. This option also causes symbolic links to be copied, rather than indirected through, and for cp to create special files rather than copying them as nor- mal files. Created directories have the same mode as the corre- sponding source directory, unmodified by the process' umask. ******************************************************************************* Note that cp copies hard linked files as separate files. If you need to preserve hard links, consider using tar(1), cpio(1), or pax(1) instead. ******************************************************************************* as usual, the difference is in the small print :-) danny