Created
May 14, 2019 12:14
-
-
Save fagci/654dd73ec9b0d861a5893384f3fb6246 to your computer and use it in GitHub Desktop.
Zip directory and copy it to remote server without creating file on local machine.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
FROM_DIRECTORY=$1 | |
SERVER=$2 | |
TO_ARCHIVE=$3 | |
zip -r - $FROM_DIRECTORY | ssh $SERVER "cat > $TO_ARCHIVE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment