Question : How do I perform this shell command in reverse?

Hi,

I found the following command which logs into a remote server, zips a file and sends it straight over the network and unzips it on the remote machine in one action, which saves I/O on both machines:

serverA $ gzip -c /file/being/zipped | ssh root@serverB "gunzip -c - > /file/unzipped"

How would I perform this command in reverse? In other words, login in to a remote server, get the remote server to zip and send the file, and then unzip it as it arrives on the local machine?

Thanks

Answer : How do I perform this shell command in reverse?

ssh root@serverB  "gzip -c /file/being/zipped "  |  gunzip -c - > /file/unzipped
Random Solutions  
 
programming4us programming4us