S3cmd使用手册
安装手册
1、下载s3cmd
[root@VM_0_17_linux ~]# yum -y install s3cmd
[root@VM_0_17_linux ~]# s3cmd --configure
Test access with supplied credentials? [Y/n] n
Save settings? [y/N] y
2、编辑配置文件
[root@VM_0_17_linux ~]# vim /root/.s3cfg
[default]
access_key = xxx
secret_key = xxx
host_base = xxx.xxx.xxx
host_bucket = %(bucket)s.xxx.xxx.xxx
3、常用命令
创建bucket: s3cmd mb s3://chy001
上传文件: s3cmd put /xxx/xxx.txt s3://chy001
删除文件: s3cmd del s3://chy001/xxx.txt
上传目录: s3cmd put -r /xxx/xxx s3://chy001/
删除目录: s3cmd del -r s3://chy001/xxx
下载文件: s3cmd get s3://chy001/xxx.txt /xxx/xxx.txt
下载目录: s3cmd get -r s3://chy001/xxx /xxx/