Command line tool to move/modify files/folders in

2020-03-24 07:54发布

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.

3条回答
干净又极端
2楼-- · 2020-03-24 08:14

I was wondering if you had heard of Google... No don't take seriously, just kidding. There are several options, e.g.:

HTH

查看更多
放我归山
3楼-- · 2020-03-24 08:20

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

查看更多
成全新的幸福
4楼-- · 2020-03-24 08:26

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.

查看更多
登录 后发表回答