diff --git a/docs/cn/source/reference/qsctl-cp.rst b/docs/cn/source/reference/qsctl-cp.rst index b038e691..b6333f3e 100644 --- a/docs/cn/source/reference/qsctl-cp.rst +++ b/docs/cn/source/reference/qsctl-cp.rst @@ -18,6 +18,7 @@ qsctl-cp [-r, --recursive] [--exclude] [--include] + [--rate-limit] ==== 描述 @@ -49,6 +50,10 @@ qsctl-cp 包含匹配特定类型的文件(对象)。 +``--rate-limit`` + +网速限制,单位可以为: K/M/G,如: 100K 、 1M。 + ==== 示例 ==== @@ -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 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 diff --git a/docs/cn/source/reference/qsctl-mv.rst b/docs/cn/source/reference/qsctl-mv.rst index eedb4aa7..c12d66a4 100644 --- a/docs/cn/source/reference/qsctl-mv.rst +++ b/docs/cn/source/reference/qsctl-mv.rst @@ -18,6 +18,7 @@ qsctl-mv [-r, --recursive] [--exclude] [--include] + [--rate-limit] ==== 描述 @@ -27,7 +28,7 @@ qsctl-mv 是目标地址。 注意: ``mv`` 命令将会删除源文件(对象),如果你不想删除源文件(对象),请 -使用 ``mv`` 命令。 +使用 ``cp`` 命令。 如果要传的文件(对象)目标地址已存在,程序将会询问覆盖或跳过。你可以使用 ``--force`` 选项强制覆盖。 @@ -52,6 +53,10 @@ qsctl-mv 包含匹配特定类型的文件(对象)。 +``--rate-limit`` + +网速限制,单位可以为: K/M/G ,如: 100K 、 1M + ==== 示例 ==== @@ -97,3 +102,21 @@ qsctl-mv File 'test/test2.txt' written Key deleted Key deleted + +下面的 ``mv`` 命令将一个本地文件移动到 ``mybucket``,并限制速度为每秒 100K:: + + $ qsctl mv test.txt qs://mybucket --rate-limit 100K + +输出:: + + Key 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 diff --git a/docs/cn/source/reference/qsctl-sync.rst b/docs/cn/source/reference/qsctl-sync.rst index a681c256..3664dc4e 100644 --- a/docs/cn/source/reference/qsctl-sync.rst +++ b/docs/cn/source/reference/qsctl-sync.rst @@ -17,6 +17,7 @@ qsctl-sync [--delete] [--exclude] [--include] + [--rate-limit] ==== 描述 @@ -44,6 +45,10 @@ qsctl-sync 包含匹配特定类型的文件(对象)。 +``--rate-limit`` + +网速限制,单位可以为: K/M/G,如: 100K 、 1M。 + ==== 示例 ==== @@ -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 created + Key created + Key created + +下面的 ``sync`` 命令将同步 ``QS-Directory`` 到本地,并限制速度为每秒 100K:: + + $ qsctl sync qs://mybucket/test/ test/ --rate-limit 100K + +输出:: + + File 'test/test1.txt' written + File 'test/test2.txt' written diff --git a/qingstor/qsctl/helper/source/qsctl-cp.rst b/qingstor/qsctl/helper/source/qsctl-cp.rst index b3cd2b68..873ed82f 100644 --- a/qingstor/qsctl/helper/source/qsctl-cp.rst +++ b/qingstor/qsctl/helper/source/qsctl-cp.rst @@ -18,6 +18,7 @@ Synopsis [-r, --recursive] [--exclude] [--include] + [--rate-limit] =========== Description @@ -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 ======== @@ -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 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 diff --git a/qingstor/qsctl/helper/source/qsctl-mv.rst b/qingstor/qsctl/helper/source/qsctl-mv.rst index b92e6893..9a3641b1 100644 --- a/qingstor/qsctl/helper/source/qsctl-mv.rst +++ b/qingstor/qsctl/helper/source/qsctl-mv.rst @@ -17,6 +17,7 @@ Synopsis [-r, --recursive] [--exclude] [--include] + [--rate-limit] =========== Description @@ -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 ======== @@ -99,3 +105,22 @@ Output:: File 'test/test2.txt' written Key deleted Key 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 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 diff --git a/qingstor/qsctl/helper/source/qsctl-sync.rst b/qingstor/qsctl/helper/source/qsctl-sync.rst index 6f963c4d..7aac607f 100644 --- a/qingstor/qsctl/helper/source/qsctl-sync.rst +++ b/qingstor/qsctl/helper/source/qsctl-sync.rst @@ -17,6 +17,7 @@ Synopsis [--delete] [--exclude] [--include] + [--rate-limit] =========== Description @@ -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 ======== @@ -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 created + Key created + Key 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