Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Script to delete files from Amazon s3 that match given date
#!/bin/bash
objects=$(s3cmd ls s3://bucket/directory/* |grep 2012-10-17 | cut -f13 -d' ')
for line in $objects ; do
s3cmd del $line
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.