-
-
Save Anthonyzou/8625fdb451a92f0f6b0d to your computer and use it in GitHub Desktop.
Upload gziped files through s3cmd
This file contains hidden or 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 sh | |
| find * -type f -not -path '*/\.*' | | |
| while read -r x; | |
| do gzip -9 -c "$x" > "$x.gz"; | |
| s3cmd put "$x.gz" "s3://my-bucket-name/$x" --add-header "Content-Encoding: gzip" | |
| done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment