养浩然之气,做博学之人
s3cmd 是一款 Amazon S3 命令行工具。它不仅能上传、下载、同步,还能设置权限。
官网:https://s3tools.org/s3cmd
下载安装包:https://s3tools.org/download
GitHub:https://github.com/s3tools/s3cmd/releases
本文安装包:https://github.com/s3tools/s3cmd/releases/download/v2.0.2/s3cmd-2.0.2.tar.gz
tar -xvzf s3cmd-2.0.2.tar.gz mv s3cmd-2.0.2/ /usr/local/s3cmd ln -s /usr/local/s3cmd/s3cmd /usr/bin/s3cmd
s3cmd --configure
配置,主要是 Access Key ID 和 Secret Access Key
#s3cmd --configure Enter new values or accept defaults in brackets with Enter. Refer to user manual for detailed description of all options. Access key and Secret key are your identifiers for Amazon S3 Access Key: ACCESS_KEY Secret Key: SECRET_ACCESS_KEY Encryption password is used to protect your files from reading by unauthorized persons while in transfer to S3 Encryption password: Path to GPG program [/usr/bin/gpg]: When using secure HTTPS protocol all communication with Amazon S3 servers is protected from 3rd party eavesdropping. This method is slower than plain HTTP and can't be used if you're behind a proxy Use HTTPS protocol [No]: On some networks all internet access must go through a HTTP proxy. Try setting it here if you can't connect to S3 directly HTTP Proxy server name: HTTP Proxy server port [3128]: New settings: Access Key: ACCESS_KEY Secret Key: SECRET_ACCESS_KEY Encryption password: Path to GPG program: /usr/bin/gpg Use HTTPS protocol: False HTTP Proxy server name: HTTP Proxy server port: 0 Test access with supplied credentials? [Y/n] n Save settings? [y/N] y
需要填写:ACCESS_KEY,SECRET_ACCESS_KEY
Test access with supplied credentials? [Y/n] n
Save settings? [y/N] y
s3cmd get --recursive s3://yahoo-webscope/L30/
先进入中断文件所在文件夹,continue 继续下载
cd en s3cmd get --continue s3://yahoo-webscope/L30/en/english-nov15.hash
编辑:孙小北
本文地址: https://www.xiaowangyun.com/wyblog/detail/?id=213
版权归属: www.xiaowangyun.com 转载时请以链接形式注明出处
0 条评论