FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 08-12-2010, 08:43 PM
Jesus Hinojosa
 
Default tar - ssh - standard out

Rsync works fine for this, keeping group and user

Regards

2010/8/12, Robert Heller <heller@deepsoft.com>:
> At Thu, 12 Aug 2010 14:46:49 +0100 CentOS mailing list <centos@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@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@deepsoft.com -- http://www.deepsoft.com/ModelRailroadSystem/
>
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>

--
Enviado desde mi dispositivo móvil

Jesús Hinojosa Palma
DVinci S.A.C
www: http://www.dvinci.pe
mail: jhinojosa@dvinci.pe
Mobil: +51 1 989097034
Phone: +51 1 7207265
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-13-2010, 04:54 AM
Gordon Messmer
 
Default tar - ssh - standard out

On 08/12/2010 06:46 AM, Tom Brown wrote:
> 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.

If "the thing" is generating log files, then it's not using "standard
out". Perhaps you are using that term incorrectly.

On a unix-like system, each process has three standard file descriptors
when it starts: these are standard output (stdout), standard error
(stderr), and standard input (stdin). These three files are inherited
from the parent process, which means that your shell normally sets them
up for the commands that you run. If you do not redirect any of those
three, then they will normally be connected to the controlling terminal
(/dev/tty is the controlling terminal for any process). You can use the
shell's redirection functions to connect those file descriptors to files
rather than to the terminal, or pipe them to another command.

If your application is writing its data to a file without your specific
redirection, then it's not using stdout and you can not pipe it to
another system without writing the data to disk.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 10:19 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org