命令行上传s3文件到指定目录:
安装aws命令行工具
pip install awscli --upgrade --user
配置环境变量:
export PATH=/home/user/.local/bin:$PATH
连接aws s3服务器:
aws configure
上传文件到s3服务器:
aws s3 sync /home/test/Temp s3://test_bucket/ --endpoint-url http://www.test.com
查看目录下的文件:
aws s3 ls s3://test_bucket/ --endpoint-url http://www.test.com
命令行参考:https://docs.aws.amazon.com/cli/index.html#lang/zh_cn