Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Remove all .DS_Store files (or any unwanted indexing file) from a S3 bucket, recursively

You can replace "*.DS_Store" with any other recurrent file (e.g. Desktop.ini)

Please!

Validate that you are going to delete only what you want passing the --dryrun option. I've left if by default just in case of copy/paste.

aws s3 rm s3://your.bucket.name/maybe-a-subkey --dryrun --recursive --exclude "*" --include "*.DS_Store"

@jeremypetrequin

This comment has been minimized.

Copy link

jeremypetrequin commented Aug 6, 2019

Thanks! 👍

@alvaropp

This comment has been minimized.

Copy link

alvaropp commented Jul 3, 2020

awesome

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.