From owner-freebsd-ports Sat Aug 10 05:24:05 1996 Return-Path: owner-ports Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id FAA14931 for ports-outgoing; Sat, 10 Aug 1996 05:24:05 -0700 (PDT) Received: from sunrise.cs.berkeley.edu (root@sunrise.CS.Berkeley.EDU [128.32.38.121]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id FAA14926 for ; Sat, 10 Aug 1996 05:24:03 -0700 (PDT) Received: from po2.glue.umd.edu (po2.glue.umd.edu [129.2.128.45]) by sunrise.cs.berkeley.edu (8.7.5/8.6.12) with ESMTP id FAA23314 for ; Sat, 10 Aug 1996 05:23:56 -0700 (PDT) Received: from channel.eng.umd.edu (channel.eng.umd.edu [129.2.98.186]) by po2.glue.umd.edu (8.7.5/8.7.3) with ESMTP id IAA06202; Sat, 10 Aug 1996 08:24:00 -0400 (EDT) Received: from localhost (chuckr@localhost) by channel.eng.umd.edu (8.7.5/8.7.3) with SMTP id IAA02324; Sat, 10 Aug 1996 08:23:54 -0400 (EDT) X-Authentication-Warning: channel.eng.umd.edu: chuckr owned process doing -bs Date: Sat, 10 Aug 1996 08:23:37 -0400 (EDT) From: Chuck Robey X-Sender: chuckr@channel.eng.umd.edu To: Narvi cc: "Jordan K. Hubbard" , FreeBSD Ports Subject: Re: using tar In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-ports@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Sat, 10 Aug 1996, Narvi wrote: > > > On Fri, 9 Aug 1996, Jordan K. Hubbard wrote: > > > > I want to use tar to move a directory hierarchy, but I want to do it > > > without using a temp directory, and I don't know the syntax to make tar > > > create an archive to stdout, then read from stdout to extract the acrchive > > > > I was all prepared to flame you for not RTFM'ing first when I noticed > > that both the tar man page and `tar --help' don't document this in > > their descriptions of the -f flag. For Shame. > > > > tar -cf - -C $SRCDIR . | tar xpf - -C $DESTDIR > > > > Will do the trick. > > > > Why not just mv $SRCDIR $DESTDIR? Yes, if $DESTDIR exist you will have to > write a for $i in ...; do mv $i $DESTDIR; done? Because that removes the possibility of doing a reinstall, same reason we use install -c and not just install. > > Sander > > > Jordan > > > ----------------------------+----------------------------------------------- Chuck Robey | Interests include any kind of voice or data chuckr@eng.umd.edu | communications topic, C programming, and Unix. 9120 Edmonston Ct #302 | Greenbelt, MD 20770 | I run Journey2 and n3lxx, both FreeBSD (301) 220-2114 | version 2.2 current -- and great FUN! ----------------------------+-----------------------------------------------