swift 命令行
2013-11-20 19:11
537 查看
也是先source用户和租间
1、查看容器和存储的对象
4、删除容器
5、上传对象a、先创建个文件500M的
b、上传到刚才创建的容器”test“中
支持目录和多个文件
6、上传大文件时,可以用-S来分片(s for segment)
最终,文件对象会上传到"test"容器中,但也会增加一个“test_segments”的容器,里面放的就是文件分片时产生的各个小分片文件。
1、查看容器和存储的对象
[root@localhost ~(keystone_admin)]# swift list [root@localhost ~(keystone_admin)]# swift list --lh 0 0 $ swift list $container #显示某个容器的对象信息2、查看状态信息
[root@localhost ~(keystone_admin)]# swift stat Account: AUTH_9387b24331da4daebac32a8ccd52dd4b Containers: 0 Objects: 0 Bytes: 0 Content-Type: text/plain; charset=utf-8 X-Timestamp: 1384944092.11535 X-Put-Timestamp: 1384944092.115353、创建容器
[root@localhost ~(keystone_admin)]# swift post test [root@localhost ~(keystone_admin)]# swift list --lh 0 0 2013-11-20 10:42:16 test 0 0
4、删除容器
[root@localhost ~(keystone_admin)]# swift delete test [root@localhost ~(keystone_admin)]# swift list --lh 0 0 $swift delete $container $object#删除某个容器里的某个对象
5、上传对象a、先创建个文件500M的
[root@localhost ~(keystone_admin)]# dd if=/dev/zero of=/tmp/example-500Mb bs=1M count=500 记录了500+0 的读入 记录了500+0 的写出 524288000字节(524 MB)已复制,0.258867 秒,2.0 GB/秒
b、上传到刚才创建的容器”test“中
[root@localhost ~(keystone_admin)]# swift upload test /tmp/example-500Mb tmp/example-500Mb
支持目录和多个文件
swift upload $container $dir swift upload $container file1 file2 ..
6、上传大文件时,可以用-S来分片(s for segment)
[root@localhost ~(keystone_admin)]# swift upload test -S 102400000 /tmp/example-500Mb tmp/example-500Mb segment 5 tmp/example-500Mb segment 0 tmp/example-500Mb segment 2 tmp/example-500Mb segment 1 tmp/example-500Mb segment 4 tmp/example-500Mb segment 3 tmp/example-500Mb
最终,文件对象会上传到"test"容器中,但也会增加一个“test_segments”的容器,里面放的就是文件分片时产生的各个小分片文件。
[root@localhost ~(keystone_admin)]# swift list --lh 2 43 2013-11-20 10:42:16 test 6 500M 2013-11-21 02:31:52 test_segments [root@localhost ~(keystone_admin)]# swift list test --lh 0 2013-11-21 02:41:32 tmp/example-500Mb 43 2013-11-20 11:02:37 tmp/test.txt 43 [root@localhost ~(keystone_admin)]# swift list test_segments --lh 97M 2013-11-21 02:41:30 tmp/example-500Mb/1384944751.119769/524288000/102400000/00000000 97M 2013-11-21 02:41:30 tmp/example-500Mb/1384944751.119769/524288000/102400000/00000001 97M 2013-11-21 02:41:30 tmp/example-500Mb/1384944751.119769/524288000/102400000/00000002 97M 2013-11-21 02:41:30 tmp/example-500Mb/1384944751.119769/524288000/102400000/00000003 97M 2013-11-21 02:41:30 tmp/example-500Mb/1384944751.119769/524288000/102400000/00000004 11M 2013-11-21 02:41:30 tmp/example-500Mb/1384944751.119769/524288000/102400000/00000005 500M
相关文章推荐
- IOS开发之Swift基础---输出命令行不换行!
- 在命令行编译和调试Swift程序
- swift命令行上的编程-环境配置
- 命令行中调试swift简单语句
- Swift命令行上的编程-参数测试
- iOS - Swift 命令行输入输出
- 编译命令行终端 swift
- Swift命令行上的编程-简单的webkit Browser
- Swift 包管理器命令行使用
- thrift:swift 命令行生成 IDL文件及Client java代码过程
- NMAKE的命令行语法
- java 调用命令行 备份mysql数据库
- 命令行星期二 —— 第三篇
- Openstack swift常见问题
- Swift基础篇——内外函数
- 命令行解决mysql中文乱码
- Swift 3.0 去掉 C 风格循环后怎么办?
- 6.1 Swift闭包的概念和分类
- Swift具体解释之三----------函数(你想知道的都在这里)
- 【自问自答】关于 Swift 的几个疑问