Re: Heads up: gtar gone from base system

From: Brian K. White <brian_at_aljex.com>
Date: Tue, 29 Mar 2005 14:58:10 -0500
----- Original Message ----- 
From: "Jos Backus" <jos_at_catnook.com>
To: <freebsd-current_at_freebsd.org>
Sent: Tuesday, March 29, 2005 1:48 PM
Subject: Re: Heads up: gtar gone from base system


> On Tue, Mar 29, 2005 at 01:56:14AM -0500, Brian K. White wrote:
> [snip]
>> >( 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.
>
> Not quite; without the first set of parentheses, destdir is interpreted
> relative to srcdir. Unless srcdir are meant as symbolic values and dstdir 
> has
> an absolute value, in which case this is not an issue.
>
> $ cd $HOME
> $ pwd
> /home/jos
> $ (cd /; pwd 1>&2) | (cd /usr; pwd)
> /
> /usr
> $ pwd
> /home/jos
> $ (cd /; pwd 1>&2) | (cd usr; pwd)
> cd: can't cd to usr
> /home/jos
> /
> $ pwd
> /home/jos
> $ cd /; pwd 1>&2 | (cd usr; pwd)
> /
> /usr
> $ pwd
> /
> $
>
> Note: /home/jos/usr doesn't exist.

Duely noted. Hadn't though of that. I am aware of it when using it and do 
sometimes use relative path and the fact that I'm sitting in srcdir and so a 
relative path will be relative to srcdir was always just an "obvious of 
course".

Brian K. White  --  brian_at_aljex.com  --  http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx  Linux SCO  Prosper/FACTS AutoCAD  #callahans Satriani
Received on Tue Mar 29 2005 - 17:58:41 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:30 UTC