S3 的一個命令行客戶端

使用Golang 實現了一個S3的簡易客戶端。

目前實現以下功能:git

  • 文件的上傳
  • 文件的下載
  • 文件的刪除
  • 文件大小,更新時間查看

目前已發佈1.0.0, 支持Windows和Linux,其餘平臺自行編譯便可。github

session config

{
  "id": "",
  "secret": "",
  "endPoint": "",
  "region": ""
}
Usage:
        s3 <command> [arguments]

The commands are:

        put       upload file to s3
        get       download file from s3
        rm        delete file in s3
        ls        list files in s3

Use "s3 <command> " for more information about a command.

upload

Usage of S3 Uploader:

        ./s3 put -c config.json [-d directory] <bucket> <file ...>

        -c config.json  config path
        -d directory    local directory
        bucket          bucket name

download

Usage of S3 Downloader:

        ./s3 get -c config.json [-d directory] [-x] <bucket> <file ...>

        -c config.json  config path
        -d directory    local directory
        -x              set output is stdout
        bucket          bucket name

delete

Usage of S3 Downloader:

        ./s3 rm -c config.json <bucket> <file ...>

        -c config.json  config path
        bucket          bucket name

list

Usage of S3 List:

        ./s3 ls -c config.json [ -h]  <bucket> <pattern>

        -c config.json    config path
        -h                human reading
        bucket            bucket name
        pattern           file pattern

Github 地址: https://github.com/lpflpf/s3-command-linejson

如須要其餘功能,能夠提Issue.session

相關文章
相關標籤/搜索