qshell基础6

2022-04-24 00:35:24 浏览数 (1)

chgm

chgm

修改七牛空间中的一个文件的MimeType

代码语言:javascript复制
[root@h101 qshell]# ./qshell_linux_amd64  chgm   qiniucloud-goods  2015/11/10/test/qshell_windows_386_test_cccccopy.exe  image/jpeg
Done!
[root@h101 qshell]# ./qshell_linux_amd64  stat   qiniucloud-goods  2015/11/10/test/qshell_windows_386_test_cccccopy.exe 
Bucket:             qiniucloud-goods          
Key:                2015/11/10/test/qshell_windows_386_test_cccccopy.exe
Hash:               Flxstje1T4ojLoOe0G4HjI_WJuVl
Fsize:              106                 
PutTime:            14471470979836277   
MimeType:           image/jpeg          

[root@h101 qshell]# 

fetch

fetch

从Internet上抓取一个资源并存储到七牛空间中

代码语言:javascript复制
[root@h101 qshell]# ./qshell_linux_amd64  fetch 'https://img.yuanmabao.com/zijie/pic/2022/04/24/umhtmuthnpu.png' qiniucloud-goods baidu_logo_1.png 
Key: baidu_logo_1.png
Hash: FrUHIqhkDDd77-AtiDcOwi94YIeM
[root@h101 qshell]# 
[root@h101 abc]# wget  https://img.yuanmabao.com/zijie/pic/2022/04/24/umhtmuthnpu.png
--2015-11-10 17:23:04--  https://img.yuanmabao.com/zijie/pic/2022/04/24/umhtmuthnpu.png
Resolving www.baidu.com... 61.135.169.121, 61.135.169.125
Connecting to www.baidu.com|61.135.169.121|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5331 (5.2K) [image/png]
Saving to: “bdlogo.png”

100%[============================================================================================>] 5,331       --.-K/s   in 0s      

2015-11-10 17:23:04 (10.4 MB/s) - “bdlogo.png” saved [5331/5331]

[root@h101 abc]#
[root@h101 abc]# ../qshell_linux_amd64   qetag  bdlogo.png  
FrUHIqhkDDd77-AtiDcOwi94YIeM
[root@h101 abc]# 

batchdelete

batchdelete

批量删除七牛空间中的文件,可以直接根据listbucket的结果来删除

代码语言:javascript复制
[root@h101 abc]# cat abc.txt 
2015/11/10/test/qshell_darwin_386	7885316	lvDom3i6Wp4mvC7EStSgXZ__2Z7a	14471462224350860	application/octet-stream	
2015/11/10/test/qshell_windows_386.exe	106	Flxstje1T4ojLoOe0G4HjI_WJuVl	14471470171609874	text/plain	
baidu_logo_1.png	5331	FrUHIqhkDDd77-AtiDcOwi94YIeM	14471472708081319	image/png	
[root@h101 abc]# ../qshell_linux_amd64   batchdelete    qiniucloud-goods  abc.txt 
<DANGER> Input giddfi to confirm operation: giddfi
All deleted!
[root@h101 abc]# 

0 人点赞