Tuesday, February 2, 2010

Transfer files accross machines using plink (putty)

Hi;

Quite often we need to download/upload files to different machines. If you have configured putty with certificates; you can use plink and cygwin gzip (to speedup the download/upload).


plink userName@PuttySession gzip -c gzip -d > fileName

Ex:

plink mruser@myServer gzip -c /var/mqm/qmgrs/SampleQmgr/errors/AMQERR01.LOG gzip -d > AMQERR01.LOG

gzip -c will compress the file and writes to stdout
gzip -d will uncompress (using pipe .. it will read from stdout as it's input).

You can also do simple cat and redirect the file...but compress the file would speed-up the transfer.

No comments: