命令行工具 qshell https://github.com/qiniu/qshell
使用qshell将服务器(Linux)的文件上传至七牛云
在目录 ~/tools/ 下载
wget http://devtools.qiniu.com/qshell-v2.2.0.zip
解压
unzip qshell-v2.2.0.zip
-
配置
vi ~/.bash_profile
export PATH=$PATH:$HOME/tools
然后
ln -s ~/tools/qshell-linux-x86 qshell
配置七牛云账号:
qshell account ak sk
-
配置上传 upload.json
{ "src_dir" : "/var/www/project/shared/public/system/", "bucket" : "bucketname", "key_prefix" : "system/", "up_host" : "http://upload-z1.qiniu.com", "ignore_dir" : false, "overwrite" : false, "check_exists" : false, "check_hash" : false, "check_size" : false, "rescan_local" : true, "skip_file_prefixes" : "test,demo,", "skip_path_prefixes" : "hello/,temp/", "skip_fixed_strings" : ".svn,.git", "skip_suffixes" : ".DS_Store,.exe", "log_file" : "upload.log", "log_level" : "info", "log_rotate" : 1, "log_stdout" : false, "file_type" : 0 }
上传
qshell qupload 5 upload.json