开发者

Command line tool to move/modify files/folders in Amazon S3

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 sam开发者_运维技巧e 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.


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.


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜