Created
October 17, 2012 17:07
-
-
Save miend/3906763 to your computer and use it in GitHub Desktop.
Script to delete files from Amazon s3 that match given date
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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