Skip to content

Instantly share code, notes, and snippets.

@Anthonyzou
Forked from philfreo/gist:3208678
Last active August 29, 2015 14:14
Show Gist options
  • Select an option

  • Save Anthonyzou/8625fdb451a92f0f6b0d to your computer and use it in GitHub Desktop.

Select an option

Save Anthonyzou/8625fdb451a92f0f6b0d to your computer and use it in GitHub Desktop.
Upload gziped files through s3cmd
#!/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