当前位置: 首页 > 后端技术 > PHP

S3的命令行客户端

时间:2023-03-29 17:29:09 PHP

使用Golang实现了一个简单的S3客户端。目前实现了以下功能:上传文件、删除文件、下载文件、删除文件大小、查看更新时间,目前已经发布1.0.0,支持Windows和Linux,其他平台可以自行编译。sessionconfig{"id":"","secret":"","endPoint":"","region":""}Usage:s3[arguments]命令为:putuploadfiletos3get从s3下载文件rm删除s3中的文件ls列出s3中的文件使用“s3”获取有关命令的更多信息。S3上传器的上传用法:./s3put-cconfig.json[-ddirectory]??-cconfig.jsonconfigpath-ddirectorylocaldirectorybucketbucketnamedownloadS3Downloader的用法:./s3get-cconfig.json[-ddirectory]??[-x]-cconfig.jsonconfigpath-ddirectorylocaldirectory-xsetoutputisstdoutbucketbucketnamedeleteS3Downloader的用法:./s3rm-cconfig.json-cconfig.jsonconfig路标tbucketnamelistS3List的使用:./s3ls-cconfig.json[-h]-cconfig.jsonconfigpath-hhumanreadingbucketbucketnamepatternfilepatternGithub地址:https://github.com/lpflpf/s3-command-line如果需要其他功能,可以提Issue。