6 个版本
| 0.3.0 | 2021 年 7 月 22 日 |
|---|---|
| 0.2.3 | 2021 年 5 月 19 日 |
| 0.2.2 | 2021 年 4 月 8 日 |
| 0.1.0 | 2021 年 4 月 8 日 |
#17 in #s3-compatible
19KB
133 行
另一个 S3 命令行工具
一个基于 durch/rust-s3 的快速且极其简单的工具,用于与 S3 兼容对象存储交互,因为所有其他工具都需要 配置,而我对此不感兴趣。
状态
用法
通过 cargo install s3-util 从源代码构建,cargo binstall s3-util 如果您有 cargo-binstall,则获取二进制文件,或者从 发布版 或 ghcr.io/ryankurte/s3-util 中的 Docker 容器中获取预构建的二进制文件。
示例
s3-util upload dir/something.txt ./localfile.txt将localfile.txt上传到存储桶中的dir/something.txts3-util upload dir/something.txt ./*.txt以匹配文件./*.txt并将其上传到存储桶中的dir/something.txts3-util upload-dir prefix/ ./*.txt将每个匹配./*.txt的文件以prefix/为前缀上传
您还可以使用 --acl 来设置 ACL,例如:为公共存储桶使用 --acl=public-read。
有关更多信息,请参阅 s3-util [SUBCOMMAND] --help,您需要根据您的对象存储提供商(特别是:ACCESS_KEY,S3_BUCKET,S3_ENDPOINT,S3_REGION 和 SECRET_KEY)配置所有选项。
s3-util 0.1.0
USAGE:
s3-util [OPTIONS] --access-key <access-key> --bucket <bucket> --endpoint <endpoint> --region <region> --secret-key <secret-key> <SUBCOMMAND>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
--access-key <access-key> Access key for bucket [env: ACCESS_KEY=]
--bucket <bucket> Bucket name [env: S3_BUCKET=]
--endpoint <endpoint> Bucket endpoint (eg. amazonaws.com) [env: S3_ENDPOINT=]
--log-level <log-level> [default: info]
--region <region> Bucket region (eg. s3-ap-northeast-1) [env: S3_REGION=]
--secret-key <secret-key> Secret key for bucket [env: SECRET_KEY=]
SUBCOMMANDS:
delete Delete an item from the bucket
download Download an item from the bucket
help Prints this message or the help of the given subcommand(s)
list Show items in bucket
upload Upload an item to the bucket
upload-dir Upload files from a directory
替代方案
依赖关系
~25–39MB
~721K SLoC