Files
doc-exports/docs/obs/tool-obsutil/obs_11_0009.html
weihongmin1 a41a4e0331 OBS Util 0115 Version
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com>
Co-authored-by: weihongmin1 <weihongmin1@huawei.com>
Co-committed-by: weihongmin1 <weihongmin1@huawei.com>
2026-02-17 10:18:57 +00:00

97 lines
7.9 KiB
HTML

<a name="obs_11_0009"></a><a name="obs_11_0009"></a>
<h1 class="topictitle1">Listing Buckets</h1>
<div id="body1542440101580"><div class="section" id="obs_11_0009__section1479112110815"><h4 class="sectiontitle">Function</h4><p id="obs_11_0009__p07733388177">You can use this command to obtain the bucket list. In the list, bucket names are displayed in lexicographical order.</p>
</div>
<div class="section" id="obs_11_0009__section1220752192216"><h4 class="sectiontitle">Command Line Structure</h4><ul id="obs_11_0009__ul45221840132020"><li id="obs_11_0009__li12524194015203">In Windows<pre class="screen" id="obs_11_0009__screen1959918571209">obsutil ls [-s] [-sc] [-du] [-fs] [-j=1] [-limit=1] [-config=xxx] </pre>
</li><li id="obs_11_0009__li8135134682010">In Linux or macOS<pre class="screen" id="obs_11_0009__screen18417544214">./obsutil ls [-s] [-sc] [-du] [-fs] [-j=1] [-limit=1] [-config=xxx] </pre>
</li></ul>
</div>
<div class="section" id="obs_11_0009__section1364541974317"><h4 class="sectiontitle">Examples</h4><ul id="obs_11_0009__ul6645219174310"><li id="obs_11_0009__li36461519174314">Take the Windows OS as an example. Run the <strong id="obs_11_0009__b129741610194715">obsutil ls -limit=5</strong> command to obtain the bucket list.<pre class="screen" id="obs_11_0009__screen2646161915433"><strong id="obs_11_0009__b36461519194313">obsutil ls -limit=5</strong>
Start at 2024-09-29 07:58:46.0506904 +0000 UTC
Bucket CreationDate Location BucketType
obs://bucket001 2018-09-03T01:53:02Z example OBJECT
obs://bucket002 2018-11-01T01:40:01Z example OBJECT
obs://bucket003 2018-10-25T11:45:45Z example OBJECT
obs://bucket004 2018-10-26T02:33:09Z example OBJECT
obs://bucket005 2018-10-26T02:34:50Z example OBJECT
Bucket number : 5</pre>
</li></ul>
</div>
<div class="section" id="obs_11_0009__section6559191102418"><h4 class="sectiontitle">Parameter Description</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_11_0009__table10831182114445" frame="border" border="1" rules="all"><thead align="left"><tr id="obs_11_0009__row683212154419"><th align="left" class="cellrowborder" valign="top" width="18.07%" id="mcps1.3.4.2.1.4.1.1"><p id="obs_11_0009__p118329219446">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.2%" id="mcps1.3.4.2.1.4.1.2"><p id="obs_11_0009__p15137125919108">Optional or Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="48.730000000000004%" id="mcps1.3.4.2.1.4.1.3"><p id="obs_11_0009__p12832121184414">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="obs_11_0009__row167881281811"><td class="cellrowborder" valign="top" width="18.07%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0009__p37889281012">s</p>
</td>
<td class="cellrowborder" valign="top" width="33.2%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0009__p177888281316">Optional (additional parameter)</p>
</td>
<td class="cellrowborder" valign="top" width="48.730000000000004%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0009__p1378816281111">Displays simplified query result.</p>
<div class="note" id="obs_11_0009__note1452085114212"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="obs_11_0009__p252035122111">In the simplified format, the returned result contains only the bucket name.</p>
</div></div>
</td>
</tr>
<tr id="obs_11_0009__row03718287317"><td class="cellrowborder" valign="top" width="18.07%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0009__p93721828432">sc</p>
</td>
<td class="cellrowborder" valign="top" width="33.2%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0009__p15372132812313">Optional (additional parameter)</p>
</td>
<td class="cellrowborder" valign="top" width="48.730000000000004%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0009__p13372228533">Queries the storage classes of the buckets when listing buckets.</p>
</td>
</tr>
<tr id="obs_11_0009__row191337306418"><td class="cellrowborder" valign="top" width="18.07%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0009__p1913323010414">j</p>
</td>
<td class="cellrowborder" valign="top" width="33.2%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0009__p171337309410">Optional (additional parameter). It must be used together with <strong id="obs_11_0009__b770944718612">sc</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="48.730000000000004%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0009__p1513363013419">The maximum number of concurrent tasks for querying the bucket storage class. The default value is the value of <strong id="obs_11_0009__b129310433513">defaultJobs</strong> in the configuration file.</p>
<div class="note" id="obs_11_0009__note891964620819"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="obs_11_0009__p1091964618820">The value is ensured to be greater than or equal to 1.</p>
</div></div>
</td>
</tr>
<tr id="obs_11_0009__row3926112051616"><td class="cellrowborder" valign="top" width="18.07%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0009__p1192652014163">du</p>
</td>
<td class="cellrowborder" valign="top" width="33.2%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0009__p6926120161618">Optional (additional parameter)</p>
</td>
<td class="cellrowborder" valign="top" width="48.730000000000004%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0009__p11926720121619">Quickly returns the total size of listed objects, without displaying detailed object information. This parameter can be used together with other parameters.</p>
<div class="note" id="obs_11_0009__note149111923132813"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="obs_11_0009__p1788521362916">This parameter takes effect only on listing objects, but not on listing buckets.</p>
</div></div>
</td>
</tr>
<tr id="obs_11_0009__row918019240510"><td class="cellrowborder" valign="top" width="18.07%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0009__p1918111241654">limit</p>
</td>
<td class="cellrowborder" valign="top" width="33.2%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0009__p218113247513">Optional (additional parameter)</p>
</td>
<td class="cellrowborder" valign="top" width="48.730000000000004%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0009__p310214615616">The maximum number of buckets that can be queried. If the value is less than 0, all buckets are listed. If it is left blank, a maximum of 1000 buckets can be listed by default.</p>
</td>
</tr>
<tr id="obs_11_0009__row617302812339"><td class="cellrowborder" valign="top" width="18.07%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0009__p153951131317">config</p>
</td>
<td class="cellrowborder" valign="top" width="33.2%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0009__p12395135316">Optional (additional parameter)</p>
</td>
<td class="cellrowborder" valign="top" width="48.730000000000004%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0009__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>
</tbody>
</table>
</div>
</div>
<div class="note" id="obs_11_0009__note95319172523"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="obs_11_0009__p1253817115217">In a bucket listing result, <strong id="obs_11_0009__b1051714190219">BucketType</strong> indicates the bucket type. <strong id="obs_11_0009__b152214462110">OBJECT</strong> indicates an object storage bucket, while <strong id="obs_11_0009__b972216919224">POSIX</strong> indicates a parallel file system.</p>
</div></div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_11_0007.html">Bucket Commands</a></div>
</div>
</div>