Date: Sat, 10 Aug 1996 08:23:37 -0400 (EDT) From: Chuck Robey <chuckr@glue.umd.edu> To: Narvi <narvi@haldjas.folklore.ee> Cc: "Jordan K. Hubbard" <jkh@time.cdrom.com>, FreeBSD Ports <FreeBSD-Ports%FreeBSD.ORG@sunrise.cs.berkeley.edu> Subject: Re: using tar Message-ID: <Pine.OSF.3.95.960810082244.2310B-100000@channel.eng.umd.edu> In-Reply-To: <Pine.BSF.3.91.960810120555.13368M-100000@haldjas.folklore.ee>
next in thread | previous in thread | raw e-mail | index | archive | help
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! ----------------------------+-----------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.3.95.960810082244.2310B-100000>