forked from docs/doc-exports
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Co-authored-by: weihongmin1 <weihongmin1@huawei.com> Co-committed-by: weihongmin1 <weihongmin1@huawei.com>
35 lines
2.4 KiB
HTML
35 lines
2.4 KiB
HTML
<a name="obs_11_0084"></a><a name="obs_11_0084"></a>
|
|
|
|
<h1 class="topictitle1">Can I Rename an Object or a Folder?</h1>
|
|
<div id="body0000001871302305"><p id="obs_11_0084__p17583123343">Yes. You can run <a href="obs_11_0053.html">the mv command</a> to rename an object or a folder. The following give two examples in Windows.</p>
|
|
<ul id="obs_11_0084__ul2098662312412"><li id="obs_11_0084__li198632362414">Running <strong id="obs_11_0084__b1724762717166">obsutil mv obs://bucket-test/key obs://bucket-test/key2</strong> to rename object <strong id="obs_11_0084__b2273193691616">key</strong> to <strong id="obs_11_0084__b12501183819162">key2</strong><pre class="screen" id="obs_11_0084__screen8522133753719"><strong id="obs_11_0084__b1852293713718">obsutil mv obs://bucket-test/key obs://bucket-test/key2</strong>
|
|
|
|
Parallel: 5 Jobs: 5
|
|
Threshold: 50.00MB PartSize: auto
|
|
CheckpointDir: xxxx
|
|
|
|
Move successfully, 19B, obs://bucket-test/key --> obs://bucket-test/key2, cost [96], status [200], request id [xxxxxxxxx]</pre>
|
|
</li><li id="obs_11_0084__li377185754113">Running <strong id="obs_11_0084__b12752171910174">obsutil mv obs://bucket-test/temp/ obs://bucket-test/temp2 -flat -f -r</strong> to rename folder <strong id="obs_11_0084__b760015361178">temp</strong> to <strong id="obs_11_0084__b5110113811175">temp2</strong><pre class="screen" id="obs_11_0084__screen11523437183713"><strong id="obs_11_0084__b752320376379">obsutil mv obs://bucket-test/temp/ obs://bucket-test/temp2/ -flat -f -r</strong>
|
|
|
|
Parallel: 5 Jobs: 5
|
|
Threshold: 50.00MB PartSize: auto
|
|
CheckpointDir: xxxx
|
|
OutputDir: xxxx
|
|
|
|
|
|
[=============================================================] 100.00% tps:0.00 2/2 174ms
|
|
Succeed count: 5 Failed count: 0
|
|
Metrics [max cost:298 ms, min cost:192 ms, average cost:238.00 ms, average tps:9.71, transferred size:70B]
|
|
|
|
Task id: 0476929d-9d23-4dc5-b2f8-0a0493f027c5</pre>
|
|
<div class="notice" id="obs_11_0084__note887849165315"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="obs_11_0084__p1887811965317">When renaming a folder, you must add the <strong id="obs_11_0084__b7967195613176">-flat</strong> parameter.</p>
|
|
</div></div>
|
|
</li></ul>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_11_0074.html">FAQs</a></div>
|
|
</div>
|
|
</div>
|
|
|