分享

Command Conferernce----swfit commands

 java_laq小馆 2013-08-26

swift commands  

swift指令

Describes the commands for swift, which is the command-line interface for the OpenStack Object Storage API.

For help on a specific swift command, enter:

OpenStack 对像存储API的命令行接口指令描述。输入下面的命令,可以查看详细的swift命令帮助:

swift help COMMAND
 

Example 16. Usage

例16:使用说明

swift COMMAND [options] [args]

 

Example 17. Commands

例17 指令

  stat [container] [object]
    Displays information for the account, container, or object depending on the
    args given (if any).
    根据提供的参数,显示账号、容器、或者对象的信息。

  list [options] [container]
    Lists the containers for the account or the objects for a container. -p or
    --prefix is an option that will only list items beginning with that prefix.
    -l produces output formatted like 'ls -l' and --lh like 'ls -lh'.
    -d or --delimiter is option (for container listings only) that will roll up
    items with the given delimiter (see http://docs./
        api/openstack-object-storage/1.0/content/list-objects.html)
    列出账号的容器,或者容器的对象。
    -p 或者--prefix 此选项表示只列出包括对应前缀的项。
    -l 表示输出将按照ls -l 或者ls -lh的格式输出
    -d 表示定界符选项(仅对容器列表有效),将列出包括定界符的项,详见
http://docs./api/openstack-object-storage/1.0/content/list-objects.html
upload [options] container file_or_directory [file_or_directory] [...] Uploads to the given container the files and directories specified by the remaining args. -c or --changed is an option that will only upload files that have changed since the last upload. -S <size> or --segment-size <size> will upload the files in segments no larger than size. -C <container> or --segment-container <container> will specify the location of the segments to <container>. --leave-segments are options as well (see --help for more).
    把文件或目录上传到指定的容器。
    -c or --changed :只上传自上次上传后改变过的文件。
    -S <size> or --segment-size <size> :只上传小于指定size的segments。
    -C <container> or --segment-container <container> :将指定segments到容器的路径。
    --leave-segments:这也是一个选项,更多信息请详见--help帮助命令。

  post [options] [container] [object]
    Updates meta information for the account, container, or object depending on
    the args given. If the container is not found, it will be created
    automatically; but this is not true for accounts and objects. Containers
    also allow the -r (or --read-acl) and -w (or --write-acl) options. The -m
    or --meta option is allowed on all and used to define the user meta data
    items to set in the form Name:Value. This option can be repeated. Example:
    post -m Color:Blue -m Size:Large
    根据指定的参数,上传元数据信息到账号、容器或者对象。
    如果容器未找到,则会自动创建,但这对于账号和对象来说,不会这样处理。
    容器同时也允许 -r (或者--read-acl) 、-w(或者--write-acl)选项。
    -m(或者--meta)选项对上述三者都适用,用于定义用户元数据项,以Name:value的形式。这个选项可以被重复。例如,
    post -m Color:Blue -m Size:Large

  download --all OR download container [options] [object] [object] ...
    Downloads everything in the account (with --all), or everything in a
    container, or a list of objects depending on the args given. For a single
    object download, you may use the -o [--output] <filename> option to
    redirect the output to a specific file or if "-" then just redirect to
    stdout.
    根据指定的参数,它可以用来下载账号的所有东东(用--all选项),或者容器的所有东东,或者对象的列表。
    为了下载一个单个对象,你可以使用 -o [--output] <filename>选项来重定向输出到一个指定的文件,或者只是输入了-,则重定向到标准输出。
  delete [options] --all OR delete container [options] [object] [object] ...
    Deletes everything in the account (with --all), or everything in a
    container, or a list of objects depending on the args given. Segments of
    manifest objects will be deleted as well, unless you specify the
    --leave-segments option.
      根据指定的参数,它可以用来下载账号的所有东东(用--all选项),或者容器的所有东东,或者对象的列表。
       对象清单列表也可以被删除,除非你指定了 --leave-segments选项。
 

Example 18. Examples

例18  例子

  swift -A https://auth.api./v1.0 -U user -K key stat

  swift --os-auth-url https://api./v2.0 --os-tenant-name tenant       --os-usernameuser --os-password password list

  swift --os-auth-token 6ee5eb33efad4e45ab46806eac010566       --os-storage-url https://10.1.5.2:8080/v1/AUTH_ced809b6a4baea7aeab61a       list

  swift list --lh

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多