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>
87 lines
7.2 KiB
HTML
87 lines
7.2 KiB
HTML
<a name="obs_11_0050"></a><a name="obs_11_0050"></a>
|
|
|
|
<h1 class="topictitle1">Creating a Folder</h1>
|
|
<div id="body1552529750621"><div class="section" id="obs_11_0050__section1479112110815"><h4 class="sectiontitle">Function</h4><p id="obs_11_0050__p11772825481">You can use this command to create a folder in a specified bucket or local file system.</p>
|
|
</div>
|
|
<div class="notice" id="obs_11_0050__note15184181913594"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="obs_11_0050__p8240134902215">No error is returned if a folder with the same name as an existing one is created, and the content of the existing folder remains unchanged.</p>
|
|
</div></div>
|
|
<div class="section" id="obs_11_0050__section1220752192216"><h4 class="sectiontitle">Command Line Structure</h4><ul id="obs_11_0050__ul832417119303"><li id="obs_11_0050__li19324181113010">In Windows<ul id="obs_11_0050__ul14371109125314"><li id="obs_11_0050__li645116618536">Creating a folder in a specified bucket<pre class="screen" id="obs_11_0050__screen2021764195319">obsutil mkdir obs://bucket/folder[/subfolder1/subfolder2] [-config=xxx] </pre>
|
|
</li><li id="obs_11_0050__li18337131475317">Creating a folder in the local file system<pre class="screen" id="obs_11_0050__screen15467124815533">obsutil mkdir folder_url [-config=xxx] </pre>
|
|
</li></ul>
|
|
</li><li id="obs_11_0050__li1476086143015">In Linux or macOS<ul id="obs_11_0050__ul102477258222"><li id="obs_11_0050__li6786202119227">Creating a folder in a specified bucket<pre class="screen" id="obs_11_0050__screen878692142210">./obsutil mkdir obs://bucket/folder[/subfolder1/subfolder2] [-config=xxx] </pre>
|
|
</li><li id="obs_11_0050__li1978614214227">Creating a folder in the local file system<pre class="screen" id="obs_11_0050__screen178620215229">./obsutil mkdir folder_url [-config=xxx] </pre>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="obs_11_0050__section17814953162816"><h4 class="sectiontitle">Examples</h4><ul id="obs_11_0050__ul581405315283"><li id="obs_11_0050__li8814653202816">Take the Windows OS as an example. Run the <strong id="obs_11_0050__b129741610194715">obsutil mkdir obs://bucket-test/folder1/folder2</strong> command to create a folder in a bucket.<pre class="screen" id="obs_11_0050__screen88147535282"><strong id="obs_11_0050__b6815155316285">obsutil mkdir obs://bucket-test/folder1/folder2</strong>
|
|
|
|
The bucket [bucket-test] does not support POSIX, create folder(s) step by step
|
|
Create folder [obs://bucket-test/folder1/] successfully, request id [0000016979E1D23C860BB3D8E4577C5E]
|
|
Create folder [obs://bucket-test/folder1/folder2] successfully, request id [0000016979E1D2B2860BB5181229C72C]</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="obs_11_0050__section6559191102418"><h4 class="sectiontitle">Parameter Description</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_11_0050__table10831182114445" frame="border" border="1" rules="all"><thead align="left"><tr id="obs_11_0050__row683212154419"><th align="left" class="cellrowborder" valign="top" width="13%" id="mcps1.3.5.2.1.4.1.1"><p id="obs_11_0050__p118329219446">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18%" id="mcps1.3.5.2.1.4.1.2"><p id="obs_11_0050__p15137125919108">Optional or Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="69%" id="mcps1.3.5.2.1.4.1.3"><p id="obs_11_0050__p12832121184414">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_11_0050__row1096715662419"><td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0050__p11357141182414">bucket</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0050__p12357511172416">Mandatory when creating a folder in a specified bucket</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="69%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0050__p1435717116242">The bucket name</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0050__row129424415242"><td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0050__p03571611152415">folder</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0050__p15150103020252">Mandatory when creating a folder in a specified bucket</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="69%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0050__p5378637132511">The folder path in the bucket. This value can contain multi-level folders. Separate each level with a slash (/).</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0050__row108328217449"><td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0050__p64495172515">folder_url</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0050__p154316502519">Mandatory when creating a folder in the local file system</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="69%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0050__p17425512259">The folder path in the local file system. The value can be an absolute path or a relative path.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0050__row951915136178"><td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0050__p114391014518">bucket-cname</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0050__p4143210950">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="69%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0050__p16143610251">The user-defined domain name bound to the bucket</p>
|
|
<div class="note" id="obs_11_0050__note16256574591"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="obs_11_0050__p172595719595">This parameter is only supported by obsutil 5.7.9 and later.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0050__row1492014154359"><td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0050__p153951131317">config</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0050__p12395135316">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="69%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0050__obs_11_0008_p1750111452317">The user-defined configuration file for executing the current command. For details about parameters that can be configured, see <a href="obs_11_0035.html">Configuration Parameters</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0050__row718819341305"><td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0050__p1966666191820">payer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0050__p1266611611820">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="69%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0050__p1166617619181">Specifies that requester pays is enabled.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_11_0012.html">Object Commands</a></div>
|
|
</div>
|
|
</div>
|
|
|