[CentOS] tar - ssh - standard out

Robert Heller heller at deepsoft.com
Thu Aug 12 19:59:37 UTC 2010


At Thu, 12 Aug 2010 14:46:49 +0100 CentOS mailing list <centos at centos.org> wrote:

> 
> > Why not just do
> >
> > `the thing that generates standard out here` | ssh -q 192.168.122.2 dd of=somethin
> >
> >
> > eg
> >
> > find . | ssh -q 192.168.122.2 dd of=find.out
> >
> > You don't need tar for anything.
> 
> 
> alas the thing that generates the output creates 5 or 6 seperate
> streams in sequence that generate 5 or 6 log files but i dont know in
> advance the names of these logs.

So the thing (program) does not write to stdout itself?  It it does '5
or 6' fopen("<random>.log","w")s?  Well, then you need to do:

(mkdir temp && cd temp && thing && tar czvf - . | \
	ssh -q 192.168.122.2 tar xvf -) && rm -rf temp

And yes, the log files will be written to the local disk before being
transfered.  There is not really anyway around this, unless you were
will / able to rewrite 'thing' to work differently.

> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
> 
>                                                             

-- 
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Download the Model Railroad System
http://www.deepsoft.com/  -- Binaries for Linux and MS-Windows
heller at deepsoft.com       -- http://www.deepsoft.com/ModelRailroadSystem/
                                                                                                                               



More information about the CentOS mailing list