Skip to content

Commit

Permalink
Complete rate limit documents
Browse files Browse the repository at this point in the history
Signed-off-by: Caden <cjc1005819688@gmail.com>
  • Loading branch information
Caden16 authored and Xuanwo committed May 3, 2017
1 parent 73d035b commit 169fb63
Show file tree
Hide file tree
Showing 6 changed files with 148 additions and 1 deletion.
23 changes: 23 additions & 0 deletions docs/cn/source/reference/qsctl-cp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ qsctl-cp
[-r, --recursive]
[--exclude]
[--include]
[--rate-limit]

====
描述
Expand Down Expand Up @@ -49,6 +50,10 @@ qsctl-cp

包含匹配特定类型的文件(对象)。

``--rate-limit``

网速限制,单位可以为: K/M/G,如: 100K 、 1M。

====
示例
====
Expand Down Expand Up @@ -88,3 +93,21 @@ qsctl-cp

File 'test/test1.txt' written
File 'test/test2.txt' written

下面的 ``cp`` 命令将一个本地文件复制到 ``mybucket``,并限制速度为每秒 100K::

$ qsctl cp test.txt qs://mybucket --rate-limit 100K

输出::

Key <test.txt> created
File 'test.txt' deleted

下面的 ``cp`` 命令将 ``mybucket`` 下的所有对象复制到本地,并限制速度为每秒 100K::

$ qsctl cp qs://mybucket test/ -r --rate-limit 100K

输出::

File 'test/test1.txt' written
File 'test/test2.txt' written
25 changes: 24 additions & 1 deletion docs/cn/source/reference/qsctl-mv.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ qsctl-mv
[-r, --recursive]
[--exclude]
[--include]
[--rate-limit]

====
描述
Expand All @@ -27,7 +28,7 @@ qsctl-mv
是目标地址。

注意: ``mv`` 命令将会删除源文件(对象),如果你不想删除源文件(对象),请
使用 ``mv`` 命令。
使用 ``cp`` 命令。

如果要传的文件(对象)目标地址已存在,程序将会询问覆盖或跳过。你可以使用
``--force`` 选项强制覆盖。
Expand All @@ -52,6 +53,10 @@ qsctl-mv

包含匹配特定类型的文件(对象)。

``--rate-limit``

网速限制,单位可以为: K/M/G ,如: 100K 、 1M

====
示例
====
Expand Down Expand Up @@ -97,3 +102,21 @@ qsctl-mv
File 'test/test2.txt' written
Key <test/test1.txt> deleted
Key <test/test2.txt> deleted

下面的 ``mv`` 命令将一个本地文件移动到 ``mybucket``,并限制速度为每秒 100K::

$ qsctl mv test.txt qs://mybucket --rate-limit 100K

输出::

Key <test.txt> created
File 'test.txt' deleted

下面的 ``mv`` 命令将 ``mybucket`` 下的所有对象移动到本地,并限制速度为每秒 100K::

$ qsctl mv qs://mybucket test/ -r --rate-limit 100K

输出::

File 'test/test1.txt' written
File 'test/test2.txt' written
24 changes: 24 additions & 0 deletions docs/cn/source/reference/qsctl-sync.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ qsctl-sync
[--delete]
[--exclude]
[--include]
[--rate-limit]

====
描述
Expand Down Expand Up @@ -44,6 +45,10 @@ qsctl-sync

包含匹配特定类型的文件(对象)。

``--rate-limit``

网速限制,单位可以为: K/M/G,如: 100K 、 1M。

====
示例
====
Expand Down Expand Up @@ -78,3 +83,22 @@ qsctl-sync
File 'test/test1.txt' written
File 'test/test2.txt' written
File 'test/test3.txt' deleted

下面的 ``sync`` 命令将同步本地当前文件夹到 ``mybucket``,并限制速度为每秒 100K::

$ qsctl sync . qs://mybucket --rate-limit 100K

输出::

Key <test1.txt> created
Key <test2.txt> created
Key <test3.txt> created

下面的 ``sync`` 命令将同步 ``QS-Directory`` 到本地,并限制速度为每秒 100K::

$ qsctl sync qs://mybucket/test/ test/ --rate-limit 100K

输出::

File 'test/test1.txt' written
File 'test/test2.txt' written
25 changes: 25 additions & 0 deletions qingstor/qsctl/helper/source/qsctl-cp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Synopsis
[-r, --recursive]
[--exclude]
[--include]
[--rate-limit]

===========
Description
Expand Down Expand Up @@ -49,6 +50,11 @@ Exclude all keys or files that match the specified pattern.

Do not exclude keys or files that match the specified pattern.

``--rate-limit``

Limit rate when cp file from local to qingstor, or qingstor to local,
unit: K/M/G, eg: 100K.

========
Examples
========
Expand Down Expand Up @@ -91,3 +97,22 @@ Output::

File 'test/test1.txt' written
File 'test/test2.txt' written

The following ``cp`` command copies a single file to bucket ``mybucket``,
and limit the transmission speed of 100K per second::

$ qsctl cp test.txt qs://mybucket --rate-limit 100K

Output::

Key <test.txt> created
File 'test.txt' deleted

The following ``cp`` command copies test1.txt in bucket ``mybucket`` to local
directory, and limit the transmission speed of 100K per second::

$ qsctl cp qs://mybucket/test1.txt test/ --rate-limit 100K

Output::

File 'test/test1.txt' written
25 changes: 25 additions & 0 deletions qingstor/qsctl/helper/source/qsctl-mv.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Synopsis
[-r, --recursive]
[--exclude]
[--include]
[--rate-limit]

===========
Description
Expand Down Expand Up @@ -51,6 +52,11 @@ Exclude all keys or files that match the specified pattern.

Do not exclude keys or files that match the specified pattern.

``--rate-limit``

Limit rate when mv file from local to qingstor, or qingstor to local,
unit: K/M/G, eg: 100K.

========
Examples
========
Expand Down Expand Up @@ -99,3 +105,22 @@ Output::
File 'test/test2.txt' written
Key <test/test1.txt> deleted
Key <test/test2.txt> deleted

The following ``mv`` command moves a single file to bucket ``mybucket``,
and limit the transmission speed of 100K per second::

$ qsctl mv test.txt qs://mybucket

Output::

Key <test.txt> created
File 'test.txt' deleted

The following ``mv`` command moves test1.txt in bucket ``mybucket`` to local
directory, and limit the transmission speed of 100K per second::

$ qsctl mv qs://mybucket/test1.txt test/ --rate-limit 100K

Output::

File 'test/test1.txt' written
27 changes: 27 additions & 0 deletions qingstor/qsctl/helper/source/qsctl-sync.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Synopsis
[--delete]
[--exclude]
[--include]
[--rate-limit]

===========
Description
Expand Down Expand Up @@ -47,6 +48,11 @@ Exclude all keys or files that match the specified pattern.

Do not exclude keys or files that match the specified pattern.

``--rate-limit``

Limit rate when sync file from local to qingstor, or qingstor to local,
unit: K/M/G, eg: 100K.

========
Examples
========
Expand Down Expand Up @@ -82,3 +88,24 @@ Output::
File 'test/test1.txt' written
File 'test/test2.txt' written
File 'test/test3.txt' deleted

The following ``sync`` command will sync local directory to QS-Directory,
and limit the transmission speed of 100K per second::

$ qsctl sync . qs://mybucket --rate-limit 100K

Output::

Key <test1.txt> created
Key <test2.txt> created
Key <test3.txt> created

The following ``sync`` command sync QS-Directory to local directory,
and limit the transmission speed of 100K per second::

$ qsctl sync qs://mybucket/test test/ --rate-limit 100K

Output::

File 'test/test1.txt' written
File 'test/test2.txt' written

0 comments on commit 169fb63

Please sign in to comment.