下载qshell工具
1.添加认证,在七牛云密钥管理中打开
qshell account AK SK NAME (NAME 自定义即可)
创建完毕会自动生成目录/root/.qshell
2.进入.qshell,添加批量上传目录配文件
vim upload.json
{
"src_dir" : "/root/upweb",
"bucket" : "syhdoctor2020-staging",
"rescan_local" : true,
"overwrite" : true
}
rescan_local:扫描新增文件,且上传,默认新增不上传
overwrite:覆盖文件,如有修改
3.批量上传命令
/opt/qshell qupload upload.json
4.列出bucket文件列表
/opt/qshell listbucket syhdoctor2020-staging > del.txt
5.批量删除文件
/opt/qshell batchdelete syhdoctor2020-staging -i del.txt
更详细的文档访问
https://developer.qiniu.com/kodo/tools/1302/qshell
6.添加CDN刷新URL
vim url-file.txt
https://patest.syh.com/
vim url-dir.txt
https://patest.syh.com/index.html
7.CDN刷新
刷新目录
/opt/qshell cdnrefresh --dirs -i url-dir.txt
刷新文件
/opt/qshell cdnrefresh -i url-file.txt
网友评论