首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >qshell基础4

qshell基础4

作者头像
franket
发布2022-04-24 00:34:38
发布2022-04-24 00:34:38
2310
举报
文章被收录于专栏:技术杂记技术杂记

ts2d

ts2d

将timestamp(单位秒)转为UTC+8:00中国日期,主要用来检查上传策略的deadline参数

代码语言:javascript
复制
[root@h101 qshell]# ./qshell_linux_amd64   ts2d  1447159453
2015-11-10 20:44:13 +0800 CST
[root@h101 qshell]# 

stat

stat

查询七牛空间中一个文件的基本信息

代码语言:javascript
复制
[root@h101 qshell]# ./qshell_linux_amd64 stat qiniucloud-goods   ux/20140618/qiniutest-shop_video_001.MP4 
Bucket:             qiniucloud-goods          
Key:                ux/20140618/qiniutest-shop_video_001.MP4
Hash:               lpb0Xu_Drayb851dgWn7RBPqcu-s
Fsize:              24559427            
PutTime:            14030768636225751   
MimeType:           video/mp4           

[root@h101 qshell]# 

tns2d

tns2d

将timestamp(单位100纳秒)转为UTC+8:00中国日期

代码语言:javascript
复制
[root@h101 qshell]# ./qshell_linux_amd64 tns2d 14030768636225751 
2014-06-18 15:34:23.6225751 +0800 CST
[root@h101 qshell]# 

qupload

qupload

同步数据到七牛空间, 带同步进度信息,和数据上传完整性检查

代码语言:javascript
复制
[root@h101 qshell]# tree /root/qshell/abc/
/root/qshell/abc/
├── qiniucloud-goods.list.txt
├── qshell_darwin_386
└── qshell_windows_386.exe

0 directories, 3 files
[root@h101 qshell]# 
[root@h101 qshell]# cat cfg 
{
    "src_dir"   :   "/root/qshell/abc",
    "access_key"    :   "ELUs327kxVPJrGCXqWae9yioc0xYZyrIpbM6Wh6x",
    "secret_key"    :   "LVzZY2SqOQ_I_kM1n00ygACVBArDvOWtiLkDtKiw",
    "bucket"    :   "qiniucloud-goods",
    "ignore_dir"    :   true,
    "key_prefix"    :   "2015/11/10/test/"
}
[root@h101 qshell]# 
[root@h101 qshell]# ./qshell_linux_amd64  qupload 10 cfg
2015/11/10 17:03:31 [INFO][qshell] qupload.go:145: listing local sync dir, this can take a long time, please wait paitently...
2015/11/10 17:03:31 [INFO][qshell] dir_cache.go:18: No cache file `/root/.qshell/qupload/4b1570c14f91b5f7ce90d7b2e8ca50f2/4b1570c14f91b5f7ce90d7b2e8ca50f2.cache' found, will create one
2015/11/10 17:03:31 [INFO][qshell] dir_cache.go:36: Walk `/root/qshell/abc' start from `2015-11-10 17:03:31.682855906 +0800 CST'
2015/11/10 17:03:31 [INFO][qshell] dir_cache.go:64: Walk `/root/qshell/abc' end at `2015-11-10 17:03:31.683089576 +0800 CST'
2015/11/10 17:03:31 [INFO][qshell] dir_cache.go:65: Walk `/root/qshell/abc' last for `264.555us'
2015/11/10 17:03:31 [INFO][qshell] qupload.go:301: Uploading /root/qshell/abc/qiniucloud-goods.list.txt => 2015/11/10/test/qiniucloud-goods.list.txt (1/3, 33.3%) ...
2015/11/10 17:03:31 [INFO][qshell] qupload.go:301: Uploading /root/qshell/abc/qshell_darwin_386 => 2015/11/10/test/qshell_darwin_386 (2/3, 66.7%) ...
2015/11/10 17:03:31 [INFO][qshell] qupload.go:301: Uploading /root/qshell/abc/qshell_windows_386.exe => 2015/11/10/test/qshell_windows_386.exe (3/3, 100.0%) ...
2015/11/10 17:03:42 [INFO][qshell] qupload.go:413: -------Upload Result-------
2015/11/10 17:03:42 [INFO][qshell] qupload.go:414: Total:	 3
2015/11/10 17:03:42 [INFO][qshell] qupload.go:415: Success:	 3
2015/11/10 17:03:42 [INFO][qshell] qupload.go:416: Failure:	 0
2015/11/10 17:03:42 [INFO][qshell] qupload.go:417: Skipped:	 0
2015/11/10 17:03:42 [INFO][qshell] qupload.go:418: Duration:	 10.920875261s
2015/11/10 17:03:42 [INFO][qshell] qupload.go:419: -------------------------
[root@h101 qshell]# 

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文系转载前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • ts2d
  • stat
  • tns2d
  • qupload
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档