qshell基础5

2022-04-24 00:34:59 浏览数 (2)

qdownload

qdownload

从七牛空间同步数据到本地,支持只同步某些前缀的文件,支持增量同步

代码语言:javascript复制
[root@h101 qshell]# cat ccfg
{
    "dest_dir"  :   "/tmp/x",
    "bucket"    :   "qiniucloud-goods",
    "domain"    :   "http://video.qiniutest.cn",
    "access_key"    :   "ELUs327kxVPJrGCXqWae9yioc0xYZyrIpbM6Wh6x",
    "secret_key"    :   "LVzZY2SqOQ_I_kM1n00ygACVBArDvOWtiLkDtKiw",
    "is_private"    :   false,
    "prefix"    :   "2015/11/10/test/"
}
[root@h101 qshell]# ./qshell_linux_amd64  qdownload 10 ccfg 
2015/11/10 17:09:57 [INFO][qshell] qdownload.go:81: List bucket...
2015/11/10 17:09:58 [INFO][qshell] qdownload.go:172: Downloading 2015/11/10/test/qiniucloud-goods.list.txt => /tmp/x/2015/11/10/test/qiniucloud-goods.list.txt ...
2015/11/10 17:09:58 [INFO][qshell] qdownload.go:172: Downloading 2015/11/10/test/qshell_darwin_386 => /tmp/x/2015/11/10/test/qshell_darwin_386 ...
2015/11/10 17:09:58 [INFO][qshell] qdownload.go:172: Downloading 2015/11/10/test/qshell_windows_386.exe => /tmp/x/2015/11/10/test/qshell_windows_386.exe ...
2015/11/10 17:10:08 [INFO][qshell] qdownload.go:137: -------Download Result-------
2015/11/10 17:10:08 [INFO][qshell] qdownload.go:138: Total:	 3
2015/11/10 17:10:08 [INFO][qshell] qdownload.go:139: Local:	 0
2015/11/10 17:10:08 [INFO][qshell] qdownload.go:140: Success:	 3
2015/11/10 17:10:08 [INFO][qshell] qdownload.go:141: Failure:	 0
2015/11/10 17:10:08 [INFO][qshell] qdownload.go:142: Duration:	 10.805590463s
2015/11/10 17:10:08 [INFO][qshell] qdownload.go:143: -----------------------------
[root@h101 qshell]#
[root@h101 qshell]# tree /tmp/x/
/tmp/x/
└── 2015
    └── 11
        └── 10
            └── test
                ├── qiniucloud-goods.list.txt
                ├── qshell_darwin_386
                └── qshell_windows_386.exe

4 directories, 3 files
[root@h101 qshell]# 

delete

delete

删除七牛空间中的一个文件

代码语言:javascript复制
[root@h101 qshell]# ./qshell_linux_amd64  delete   qiniucloud-goods  2015/11/10/test/qshell_windows_386.exe 
Done!
[root@h101 qshell]#

move

move

移动或重命名七牛空间中的一个文件

代码语言:javascript复制
[root@h101 qshell]# ./qshell_linux_amd64  move    qiniucloud-goods  2015/11/10/test/qiniucloud-goods.list.txt  qiniucloud-goods  2015/11/10/test/qshell_windows_386.exe 
Done!
[root@h101 qshell]# 

copy

copy

移动或重命名七牛空间中的一个文件

代码语言:javascript复制
[root@h101 qshell]# ./qshell_linux_amd64  copy     qiniucloud-goods  2015/11/10/test/qshell_windows_386.exe   qiniucloud-goods  2015/11/10/test/qshell_windows_386_test_cccccopy.exe 
Done!
[root@h101 qshell]# 

0 人点赞