Skip to content

Instantly share code, notes, and snippets.

@thomasjsn
Last active August 5, 2016 21:32
Show Gist options
  • Save thomasjsn/4113791d1177bece77fee76068ef7d42 to your computer and use it in GitHub Desktop.
Save thomasjsn/4113791d1177bece77fee76068ef7d42 to your computer and use it in GitHub Desktop.
A reminder for some common s3cmd syntax.
# Sync folders, follow symlinks, don't store FS attributes
s3cmd sync -F --no-preserve origin/ s3://bucket/
# Sync folders recursivly, delete remote objects with no corresponding local file
s3cmd sync -r --delete-removed assets/ s3://bucket/assets/
# Add header to single file on bucket
s3cmd modify -r --add-header=Cache-Control:max-age=0 s3://bucket/index.html
# Remove header from all files in folder (or on bucket)
s3cmd modify -r --remove-header=x-amz-meta-s3cmd-attrs s3://bucket/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment