Skip to content

Instantly share code, notes, and snippets.

View Anthonyzou's full-sized avatar
🐟
Shell

Anthonyzou

🐟
Shell
  • Canada
  • 22:27 (UTC -06:00)
View GitHub Profile
@Anthonyzou
Anthonyzou / gzS3
Last active August 29, 2015 14:14 — forked from philfreo/gist:3208678
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;