zsh-users
 help / color / mirror / code / Atom feed
* file transfer with zsh
@ 2011-03-30 12:09 Simon Mages
  2011-03-30 14:37 ` Bart Schaefer
  2011-03-30 15:36 ` Stephane Chazelas
  0 siblings, 2 replies; 5+ messages in thread
From: Simon Mages @ 2011-03-30 12:09 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 501 bytes --]

Hi,

I have to transfer archives from many Solaris 10 Machines to one of them. I
can't use FTP, NFS or Netcat because they are not installed or blocked and
SCP (SFTP) is to slow.

So i studied the man pages of zshtcpsys and zshmodules but with no success.
I found some Examples in the Internet but they only transfer text in
different ways.

At the Moment i don't have access to the Machines but i think the installed
zsh version is 4.1.2 or 4.1.1.


Can someone give me an working example?

BR Simon

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: file transfer with zsh
  2011-03-30 12:09 file transfer with zsh Simon Mages
@ 2011-03-30 14:37 ` Bart Schaefer
  2011-03-30 16:29   ` Simon Mages
  2011-03-30 15:36 ` Stephane Chazelas
  1 sibling, 1 reply; 5+ messages in thread
From: Bart Schaefer @ 2011-03-30 14:37 UTC (permalink / raw)
  To: Simon Mages, zsh-users

On Mar 30,  2:09pm, Simon Mages wrote:
} 
} I have to transfer archives from many Solaris 10 Machines to one of them. I
} can't use FTP, NFS or Netcat because they are not installed or blocked and
} SCP (SFTP) is to slow.

If SFTP is too slow, you're not likely to write a shell script that
outperforms it enough to make any useful difference.  Have you checked
whether rsync will work?  That'd be your most efficient option.

What is it you were hoping to do?  Set up your own service listening on
a port on one machine and connect to it from another?  That's done with
the tcp_point and tcp_shoot commands; run tcp_point on the destination
machine and then tcp_shoot on the source machine.  There's an example
of this in the documentation.  "sum" or "md5sum" the files on both
sides after transfer to make sure nothing was lost or corrupted.

However, if you can set up tcp_point on an open port on the target
machine, you ought to be able to set up an rsync daemon instead, and
that'll be much more reliable and probably a lot faster.

Failing that, I'd recommend instead that you create an account on one of
the cloud-based file-sharing services like dropbox.com or the recently-
announced Amazon cloud drive or even Amazon S3.  Push the archives there
and then pull them down to the target.  Yes, this theoretically takes
twice as long as direct transfer but should be reliable and possibly
automatic (hmm, I don't know if e.g. dropbox has a Solaris client).


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: file transfer with zsh
  2011-03-30 12:09 file transfer with zsh Simon Mages
  2011-03-30 14:37 ` Bart Schaefer
@ 2011-03-30 15:36 ` Stephane Chazelas
  2011-03-30 16:31   ` Simon Mages
  1 sibling, 1 reply; 5+ messages in thread
From: Stephane Chazelas @ 2011-03-30 15:36 UTC (permalink / raw)
  To: Simon Mages; +Cc: zsh-users

2011-03-30 14:09:18 +0200, Simon Mages:
> Hi,
> 
> I have to transfer archives from many Solaris 10 Machines to one of them. I
> can't use FTP, NFS or Netcat because they are not installed or blocked and
> SCP (SFTP) is to slow.
> 
> So i studied the man pages of zshtcpsys and zshmodules but with no success.
> I found some Examples in the Internet but they only transfer text in
> different ways.
> 
> At the Moment i don't have access to the Machines but i think the installed
> zsh version is 4.1.2 or 4.1.1.
[...]

To transfer directory "dir" from host hostA to host hostB:

On host hostB, run

(zmodload -i zsh/net/tcp &&
 ztcp -ld3 11111 &&
 ztcp -ad4 3 &&
 tar -zxpf - --numeric-owner <&4
)

Then on host hostA

(zmodload -i zsh/net/tcp &&
 ztcp -d3 hostB 11111 &&
 tar cf - dir | gzip -1 >&3
)

-- 
Stephane


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: file transfer with zsh
  2011-03-30 14:37 ` Bart Schaefer
@ 2011-03-30 16:29   ` Simon Mages
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Mages @ 2011-03-30 16:29 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-users

[-- Attachment #1: Type: text/plain, Size: 1917 bytes --]

2011/3/30 Bart Schaefer <schaefer@brasslantern.com>

> On Mar 30,  2:09pm, Simon Mages wrote:
> }
> } I have to transfer archives from many Solaris 10 Machines to one of them.
> I
> } can't use FTP, NFS or Netcat because they are not installed or blocked
> and
> } SCP (SFTP) is to slow.
>
> If SFTP is too slow, you're not likely to write a shell script that
> outperforms it enough to make any useful difference.  Have you checked
> whether rsync will work?  That'd be your most efficient option.
>
> What is it you were hoping to do?  Set up your own service listening on
> a port on one machine and connect to it from another?  That's done with
> the tcp_point and tcp_shoot commands; run tcp_point on the destination
> machine and then tcp_shoot on the source machine.  There's an example
> of this in the documentation.  "sum" or "md5sum" the files on both
> sides after transfer to make sure nothing was lost or corrupted.
>
> However, if you can set up tcp_point on an open port on the target
> machine, you ought to be able to set up an rsync daemon instead, and
> that'll be much more reliable and probably a lot faster.
>
> Failing that, I'd recommend instead that you create an account on one of
> the cloud-based file-sharing services like dropbox.com or the recently-
> announced Amazon cloud drive or even Amazon S3.  Push the archives there
> and then pull them down to the target.  Yes, this theoretically takes
> twice as long as direct transfer but should be reliable and possibly
> automatic (hmm, I don't know if e.g. dropbox has a Solaris client).
>


Oh thanks, i over read tcp_point and tcp_shoot, it is working for me.

The Reason why i try to use the ZSH is that im not allowed to change the
setup of the Machines or activate a Daemon or something.

But zsh is installed and full usable. And this cloud thing is not
practicable because this Machines haven't a Internet Connection.

BR Simon

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: file transfer with zsh
  2011-03-30 15:36 ` Stephane Chazelas
@ 2011-03-30 16:31   ` Simon Mages
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Mages @ 2011-03-30 16:31 UTC (permalink / raw)
  To: zsh-users; +Cc: Stephane Chazelas

[-- Attachment #1: Type: text/plain, Size: 985 bytes --]

2011/3/30 Stephane Chazelas <stephane.chazelas@gmail.com>

> 2011-03-30 14:09:18 +0200, Simon Mages:
> > Hi,
> >
> > I have to transfer archives from many Solaris 10 Machines to one of them.
> I
> > can't use FTP, NFS or Netcat because they are not installed or blocked
> and
> > SCP (SFTP) is to slow.
> >
> > So i studied the man pages of zshtcpsys and zshmodules but with no
> success.
> > I found some Examples in the Internet but they only transfer text in
> > different ways.
> >
> > At the Moment i don't have access to the Machines but i think the
> installed
> > zsh version is 4.1.2 or 4.1.1.
> [...]
>
> To transfer directory "dir" from host hostA to host hostB:
>
> On host hostB, run
>
> (zmodload -i zsh/net/tcp &&
>  ztcp -ld3 11111 &&
>  ztcp -ad4 3 &&
>  tar -zxpf - --numeric-owner <&4
> )
>
> Then on host hostA
>
> (zmodload -i zsh/net/tcp &&
>  ztcp -d3 hostB 11111 &&
>  tar cf - dir | gzip -1 >&3
> )
>
> --
> Stephane
>

Thanks, this is very helpful.

BR Simon

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-03-30 16:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-30 12:09 file transfer with zsh Simon Mages
2011-03-30 14:37 ` Bart Schaefer
2011-03-30 16:29   ` Simon Mages
2011-03-30 15:36 ` Stephane Chazelas
2011-03-30 16:31   ` Simon Mages

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).