linux aws s3 上传对象到openstack swift 存储

1 安装 AWS CLI  

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install

2  查看当前版本

aws --version

3  卸载

pip uninstall awscli

4  配置 AWS CLI

aws configure

5, 上传对象

aws s3 cp /test1/111.txt s3://aaaa --endpoint http://oss-cnbj01.cdsgss.com

6 访问s3: 需要输入endpoint

每次需要输入  aws s3 --endpoint http://oss-cnbj01.cdsgss.com --profile sh "$@" ls s3://

很麻烦, 可以设置为 aws-sh=aws s3 --endpoint=http://oss-cnbj01.cdsgss.com
--profile sh "$@"

之后就可以通过aws-sh ls s3://***来查看s3了.

7  其他s3命令

  • aws-sh ls s3://容器名称
  • aws-sh cp fileName s3://容器名称/fileName  [复制文件]
  • aws-sh cp --recursive filePath s3://容器名称/filePath  [ 复制目录i]
  • aws-sh rm s3://容器名称 删除
  • 从s3获取 aws-sh cp s3://容器名称/fileName ./
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值