Last active
December 22, 2015 15:28
-
-
Save kiyanwang/6492329 to your computer and use it in GitHub Desktop.
Copy all files from a S3 bucket/folder to another S3 bucket/folder
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
s3cmd ls s3://sourcebucket/sourcefolder/ | awk '{ print $4 }' | tail -n +2 | sed -e 's!^s3://sourcebucket/sourcefolder/\([a-z0-9\_\.]*\)!s3cmd cp s3://sourcebucket/sourcefolder/\1 s3://targetbucket/targetfolder/\1!g' | bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment