--- title: "ls" slug: "cli-objectstorage-high-level-ls" updated: 2026-10-08T09:50:28Z published: 2026-10-08T09:50:28Z canonical: "cli.ncloud-docs.com/cli-objectstorage-high-level-ls" --- > ## 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. # ls Classic/VPC環境で利用できます。 バケット、フォルダ、またはオブジェクトリストを照会します。 ## 構文 `ls`構文は次の通りです。 ``` aws s3 ls \ [] \ [--recursive] \ [--page-size ] \ [--human-readable] \ [--summarize] \ --endpoint-url ``` ## オプション `ls`の実行時に指定できるオプションについて説明します。 ### 任意オプション `ls`の任意オプションです。指定しない場合、オプションにはデフォルト値が適用されます。 | オプション | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `<s3-uri>` | String | Optional | バケットまたはパスの S3 URI - `s3://{bucket_name}[/{prefix}]`形式で入力 - 入力しない場合、アカウントが所有する全バケットを照会 | | `--recursive` | Boolean | Optional | 指定したパスの配下の Prefixまで照会 | | `--page-size` | Integer | Optional | ページごとの項目数 - `1`~`1000` | | `--human-readable` | Boolean | Optional | オブジェクトのサイズを、Bytes、KiB、MiB、GiBなど、読みやすい単位で表示 | | `--summarize` | Boolean | Optional | 照会結果のオブジェクト総数と合計サイズを表示 | ### 共通オプション `aws`コマンドで共通して使用するオプションについては、[Object Storageのオプション](/docs/ja/guide-objectstorage#%EC%98%B5%EC%85%98)をご参照ください。 ## 例 リストの照会リクエストが成功すると、バケット名、またはオブジェクトの最終更新日時、サイズ、名前が出力されます。 ### コマンド アカウントが所有するすべてのバケットリストを照会するコマンドの例は次の通りです。 ``` aws s3 ls \ --endpoint-url=https://kr.object.ncloudstorage.com ``` バケット内のオブジェクトリストを照会するコマンドの例は次の通りです。 ``` aws s3 ls s3://my-test-bucket \ --endpoint-url=https://kr.object.ncloudstorage.com ``` バケット内のオブジェクトの総数とサイズを照会するコマンドの例は次の通りです。 ``` aws s3 ls s3://my-test-bucket \ --recursive \ --human-readable \ --summarize \ --endpoint-url=https://kr.object.ncloudstorage.com ``` ### 出力 アカウントが所有するすべてのバケットリストを照会する出力の例は次の通りです。 ``` 2026-04-28 10:31:27 my-docs-bucket 2026-09-02 14:30:20 my-backup-bucket 2026-08-19 11:36:46 my-test-bucket ``` バケット内のオブジェクトリストを照会する出力の例は次の通りです。 ``` PRE docs/ PRE img/ 2026-09-02 15:41:01 5242880 large.bin 2026-09-02 14:33:24 24 notes.txt 2026-09-02 14:33:23 46 sample.txt ``` バケット内のオブジェクトの総数とサイズを照会する出力の例は次の通りです。 ``` 2026-09-02 14:33:23 41 Bytes docs/report.txt 2026-09-02 15:39:50 70 Bytes img/image.png 2026-09-02 15:41:01 5.0 MiB large.bin 2026-09-02 14:33:24 24 Bytes notes.txt 2026-09-02 14:33:23 46 Bytes sample.txt Total Objects: 5 Total Size: 5.0 MiB ```