Re: Heads up: gtar gone from base system

From: Jos Backus (jos_at_catnook.com)
Date: 03/29/05

  • Next message: Dan Cojocar: "Re: Interrupt storm"
    Date: Tue, 29 Mar 2005 10:47:45 -0801
    To: freebsd-current@freebsd.org
    
    

    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.

    -- 
    Jos Backus
    jos at catnook.com
    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
    

  • Next message: Dan Cojocar: "Re: Interrupt storm"

    Relevant Pages

    • Re: Heads up: gtar gone from base system
      ... whereas my example would have left you sitting in srcdir. ... > $ pwd ... sometimes use relative path and the fact that I'm sitting in srcdir and so a ...
      (freebsd-current)
    • Re: Heads up: gtar gone from base system
      ... >> All the first perens does is leave you sitting wherever you were before ... whereas my example would have left you sitting in srcdir. ... within its output trees and I regularly have to remind ...
      (freebsd-current)
    • Re: Heads up: gtar gone from base system
      ... whereas my example would have left you sitting in srcdir. ... > It makes no functional difference in the tar/untar job itself. ... > sco's tar man page but it's such basic shell and tar usage that it works the ...
      (freebsd-current)