简体   繁体   中英

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 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.

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, eg:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM