Skip to content

Instantly share code, notes, and snippets.

@diegoy
Last active September 23, 2016 19:20
Show Gist options
  • Save diegoy/d60d3069e77d9d88f03b8ee5ef9cd998 to your computer and use it in GitHub Desktop.
Save diegoy/d60d3069e77d9d88f03b8ee5ef9cd998 to your computer and use it in GitHub Desktop.
Add cache control to all files in a folder
awk 'BEGIN { for (i = 1; i <= 315; ++i) system("s3cmd --recursive modify --add-header=\"Cache-Control:public ,max-age= 31536000\" --dry-run s3://yourbucket/users/avatars/000/"sprintf("%03d", i)) }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment