Friday, January 20, 2012

Push a bunch of files over SSH to a remote location

Example given:
  1. TAR + GZIP some files (including directories)
  2. SSH them onto mamlan.com remote host using me as a user and www/ectasea as a target directory
  3. UnGZIP + unTAR everything
tar czf - 3rdparty common ectasea extensions global.inc index.php login 
| ssh me@mamlan.com "tar xzf - -C www/ectasea"