Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"You need tender loving care once a week - so that I can slap you into shape." -- Ellyn Mustard


devel / comp.unix.shell / Re: cd /tmp && tar -cvf - /etc | tar -xvf -

SubjectAuthor
* Re: cd /tmp && tar -cvf - /etc | tar -xvf -William Unruh
`- Re: cd /tmp && tar -cvf - /etc | tar -xvf -hongy...@gmail.com

1
Re: cd /tmp && tar -cvf - /etc | tar -xvf -

<s577qu$bsq$1@dont-email.me>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=3639&group=comp.unix.shell#3639

 copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: unr...@invalid.ca (William Unruh)
Newsgroups: comp.unix.shell
Subject: Re: cd /tmp && tar -cvf - /etc | tar -xvf -
Date: Wed, 14 Apr 2021 17:13:02 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <s577qu$bsq$1@dont-email.me>
References: <983fa996-a084-4948-918e-0ff20c55560dn@googlegroups.com>
Injection-Date: Wed, 14 Apr 2021 17:13:02 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="338f6d416e9731b7e70cc53be218e2a7";
logging-data="12186"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18TT2YPXUvXP9XoqAp6w7ps"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:y3eAZ6+ylOQciN/aPmhaC0FMuN0=
 by: William Unruh - Wed, 14 Apr 2021 17:13 UTC

On 2021-04-14, hongy...@gmail.com <hongyi.zhao@gmail.com> wrote:
> I try to understand the following command sequenc:
>
> $ cd /tmp && tar -cvf - /etc | tar -xvf -
>
> But l'm still not so clear on the execution logic of the 2nd and 3rd commands. Any hints will be highly appreciated.

It is an overly complicate way of doing say
rsync -av /etc /tmp
Ie, the first tar creates a tar archive of /etc and send it to stdout
(-f - means create the tar file onto the file stdout.) and the second
tar takes the file stdin and unpacks the tar file. Ie., this is just a
copy but without rsyncs checks cryptographic hash checks that the copy
is an accurate copy.

>
> Regards,
> HY

Re: cd /tmp && tar -cvf - /etc | tar -xvf -

<de347b7f-b4a5-4ab8-9d26-6d2bccd80c29n@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=3648&group=comp.unix.shell#3648

 copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:ac8:7c56:: with SMTP id o22mr2978554qtv.133.1618492870046;
Thu, 15 Apr 2021 06:21:10 -0700 (PDT)
X-Received: by 2002:a37:8184:: with SMTP id c126mr875728qkd.353.1618492869886;
Thu, 15 Apr 2021 06:21:09 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Thu, 15 Apr 2021 06:21:09 -0700 (PDT)
In-Reply-To: <s577qu$bsq$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=103.138.53.88; posting-account=kF0ZaAoAAACPbiK5gldhAyX5qTd3krV2
NNTP-Posting-Host: 103.138.53.88
References: <983fa996-a084-4948-918e-0ff20c55560dn@googlegroups.com> <s577qu$bsq$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <de347b7f-b4a5-4ab8-9d26-6d2bccd80c29n@googlegroups.com>
Subject: Re: cd /tmp && tar -cvf - /etc | tar -xvf -
From: hongyi.z...@gmail.com (hongy...@gmail.com)
Injection-Date: Thu, 15 Apr 2021 13:21:10 +0000
Content-Type: text/plain; charset="UTF-8"
 by: hongy...@gmail.com - Thu, 15 Apr 2021 13:21 UTC

On Thursday, April 15, 2021 at 1:13:06 AM UTC+8, William Unruh wrote:
> On 2021-04-14, hongy...@gmail.com <hongy...@gmail.com> wrote:
> > I try to understand the following command sequenc:
> >
> > $ cd /tmp && tar -cvf - /etc | tar -xvf -
> >
> > But l'm still not so clear on the execution logic of the 2nd and 3rd commands. Any hints will be highly appreciated.
> It is an overly complicate way of doing say
> rsync -av /etc /tmp
> Ie, the first tar creates a tar archive of /etc and send it to stdout
> (-f - means create the tar file onto the file stdout.) and the second
> tar takes the file stdin and unpacks the tar file. Ie., this is just a
> copy but without rsyncs checks cryptographic hash checks that the copy
> is an accurate copy.

Thank you and all the others here for the insightful notes and explanations.

Regards,
HY

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor