--- title: "list" slug: "cli-archivestorage-list" updated: 2026-10-08T09:45:33Z published: 2026-10-08T09:45:33Z canonical: "cli.ncloud-docs.com/cli-archivestorage-list" --- > ## Documentation Index > Fetch the complete documentation index at: https://cli.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # list Classic/VPC環境で利用できます。 アカウントのコンテナ(バケット)リストまたはコンテナ内のオブジェクトリストを照会します。 参考 サブアカウントはアカウントのコンテナリストを照会する`swift list`コマンドを使用できません。 ## 構文 `list`構文は次の通りです。 - アカウント(コンテナリストの照会) ``` swift list \ [--long] \ [--lh] \ [--totals] \ [--prefix ] \ [--json] \ [--header ] ``` - コンテナ(オブジェクトリストの照会) ``` swift list \ \ [--long] \ [--lh] \ [--totals] \ [--prefix ] \ [--delimiter ] \ [--json] \ [--header ] ``` ## オプション `list`の実行時に指定できるオプションについて説明します。 ### 必須オプション `list`の必須オプションです。 | オプション | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `--long` | Boolean | Conditional | `ls -l`形式の詳細なリストを出力 - `--totals`入力時、`--long`、`--lh`のいずれかは必ず入力 | | `--lh` | Boolean | Conditional | サイズを読みやすい単位で表示 - `--totals`入力時、`--long`、`--lh`のいずれかは必ず入力 | ### 任意オプション `list`の任意オプションです。指定しない場合、オプションにはデフォルト値が適用されます。 | オプション | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `<container>` | String | Optional | コンテナ名 - 未入力時、アカウント内のコンテナリストを照会 | | `--totals` | Boolean | Optional | 合計のみを出力 - `--long`または`--lh`と併せて使用 | | `--prefix` | String | Optional | 指定した接頭辞で始まる項目のみ照会 | | `--delimiter` | String | Optional | 指定した区切り文字に基づいて項目をグループ化して出力 | | `--json` | Boolean | Optional | リスト情報を JSON形式で出力 | | `--header` | String | Optional | リスト照会リクエストに使用するユーザー定義ヘッダ - `header:value`形式で入力 | ### 共通オプション `swift`コマンドで共通して使用するオプションについては、[Archive Storageのオプション](/docs/ja/guide-archivestorage#%EC%98%B5%EC%85%98)をご参照ください。 ## 例 コマンドを実行すると、コンテナ名またはオブジェクト名が表示されます。オプションによっては、サイズや最終更新日時などの詳細情報が含めて出力されます。 ### コマンド アカウントのコンテナリストを照会するコマンドの例は次の通りです。 ``` swift list ``` コンテナ内のオブジェクトリストを詳細形式で照会するコマンドの例は、次の通りです。 ``` swift list test-container-01 --long --lh ``` 合計のみを照会するコマンドの例は次の通りです。 ``` swift list test-container-01 --long --lh --totals ``` JSON形式での照会するコマンドの例は次の通りです。 ``` swift list test-container-01 --json ``` ### 出力 アカウント内のコンテナリストを照会する出力の例は次の通りです。 ``` test-container-01 test-segments-01 ``` 詳細形式で照会すると、最後の行に全体の合計サイズが出力されます。オブジェクトリストを詳細形式で照会する出力の例は次の通りです。 ``` 5.0M 2026-08-19 01:53:39 application/octet-stream large.bin 54 2026-08-19 01:53:40 text/plain renamed.txt 54 2026-08-19 01:53:19 text/plain sample.txt 5.0M ``` 合計のみを照会する出力の例は次の通りです。 ``` 5. 0M ``` JSON形式で照会する出力の例は次の通りです。 ``` [ { "bytes": 5242880, "content_type": "application/octet-stream", "hash": "8f0e1b84bfafca589762d5b0dd4f1286", "last_modified": "2026-08-19T01:53:39.919390", "name": "large.bin", "slo_etag": "\"207cfeb70ee1769505fcfc717e3f8be0\"" }, { "bytes": 54, "content_type": "text/plain", "hash": "448575206ef0bb80c79087a7e85c1f5c", "last_modified": "2026-08-19T01:53:40.342020", "name": "renamed.txt" } ] ```