Skip to content

Instantly share code, notes, and snippets.

@shnya
Created June 11, 2015 03:27
Show Gist options
  • Save shnya/3d4c1cb542f687619c65 to your computer and use it in GitHub Desktop.
Save shnya/3d4c1cb542f687619c65 to your computer and use it in GitHub Desktop.
Amazon S3 batch change script
#!/bin/bash
for FILE in `s3cmd ls -r s3://auone-search/spfeature/ | awk '{print $4}'`
do
echo $FILE
s3cmd modify --add-header=Cache-Control:max-age=2592000 $FILE
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment