[Sussex] Mail for Nik
sussex at welikegoats.com
sussex at welikegoats.com
Tue Apr 12 13:00:41 UTC 2005
On Tue, 12 Apr 2005 steve at dobson.org wrote:
> On Tue, Apr 12, 2005 at 12:36:24PM +0000, sussex at welikegoats.com wrote:
> > On Tue, 12 Apr 2005 steve at dobson.org wrote:
> > > On Tue, Apr 12, 2005 at 01:25:52PM +0100, Richie Jarvis wrote:
> > > > Been trying to remember that nice tar statement you advocated at the
> > > > last moot to copy dirs over - can you send it to me please?
> > >
> > > He didn't get it right on the slide, IIRC, but here is my version that
> > > works:
> > >
> > > (cd <src-dir> && tar cf - .) | (cd <dst-dir> && tar xcf -)
> >
> > Well, I wouldn't use compression, since you are never saving the tar
> > anywhere.
>
> It doesn't use compression. The first "c" is for create. As Richie
> spotted the second "c" should be a "v" (verbose) so you can see how
> fare it has got.
I know this. I made a thinko.
> > Also, I don't really see the difference between this and cp -a
> > src-dir dst-dir ...
>
> Well I don't think cp(1) has an exclude patter argument that tar(1) does.
> While it isn't being used here it could be used to omit all the files
> ending in ".o" which would save time & disk space.
>
> But the real power is in adding to the pipeline. Take a look at the
> example I am using here which copies from one machine to another.
> Compression might have been useful here (the network is the bottleneck).
Ah, but that was not in the original example. :)
More information about the Sussex
mailing list