Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Aug 1996 06:44:41 -0700 (PDT)
From:      "Jonathan M. Bresler" <jmb>
To:        chuckr@glue.umd.edu (Chuck Robey)
Cc:        FreeBSD-Ports@FreeBSD.ORG
Subject:   Re: using tar
Message-ID:  <199608111344.GAA13384@freefall.freebsd.org>
In-Reply-To: <Pine.OSF.3.95.960810004936.774A-100000@modem.eng.umd.edu> from "Chuck Robey" at Aug 10, 96 00:52:39 am

next in thread | previous in thread | raw e-mail | index | archive | help
Chuck Robey 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
> elsewhere.  Anyone else know it?  I want to use it to transport something
> from usr/local (not /usr/local, thank goodness) to $(PREFIX).

	cd <source_dir>
	tar cf - | ( cd <dest_dir>; tar xvfBp - )

jmb



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608111344.GAA13384>