Created
January 16, 2013 22:21
-
-
Save fernandoaleman/4551494 to your computer and use it in GitHub Desktop.
How to recursively delete Amazon S3 zero byte files from buckets
This file contains hidden or 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
s3cmd ls --recursive s3://BUCKET_NAME | ruby -rdate -ne 'date, time, size, uri = $_.split; puts uri if size == "0"' | xargs s3cmd del |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment