问题
Was wondering.
Is there any CLI tool available for Amazon S3 to play around with files/folders, actions like move
, delete
, etc.
Basically I got a task where I have to move bunch (a lot) of files from a bucket to a folder on the same bucket, so that I don't have to see whole files when I open the bucket in S3 console.
I am expecting a tool or kind of script which help me move files from one place to a folder on the same bucket.
回答1:
A few days ago, Amazon added new file commands.
The AWS CLI webpage is at http://aws.amazon.com/cli/#file These are python scripts (Python 2.6 or higher required). On Mac and Linux you can install using 'pip install awscli'. For windows there is an installer.
回答2:
I was wondering if you had heard of Google... No don't take seriously, just kidding. There are several options, e.g.:
- http://s3tools.org/s3cmd
- http://aws.amazon.com/code/1710
HTH
回答3:
To create a folder and move files into it just use the mv command and include the folder in the path - it will be created automatically.
Example: create folder "newFolder" and move file "pic.jpg" from bucket root:
aws s3 mv s3://bucket-name/pic.jpg s3://bucket-name/newFolder/pic.jpg
来源:https://stackoverflow.com/questions/6579125/command-line-tool-to-move-modify-files-folders-in-amazon-s3