--- title: "ls" slug: "ls" updated: 2026-10-08T09:46:34Z published: 2026-10-08T09:46:34Z canonical: "cli.ncloud-docs.com/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`コマンドで共通して使用するオプションについては、[Ncloud Storageのオプション](/docs/ja/storage-ncloudstorage#%EC%98%B5%EC%85%98)をご参照ください。 ## 例 リストの照会リクエストが成功すると、バケットの作成日時と名前、または各オブジェクトの最終更新日時、サイズ、名前が出力されます。配下の Prefixは`PRE {prefix}/`形式で表示されます。 ### コマンド アカウントが所有するすべてのバケットリストを照会するコマンドの例は次の通りです。 ``` aws s3 ls \ --endpoint-url=https://kr.ncloudstorage.com ``` バケット内のオブジェクトリストを照会するコマンドの例は次の通りです。 ``` aws s3 ls s3://my-test-bucket \ --endpoint-url=https://kr.ncloudstorage.com ``` バケット内のオブジェクトの総数とサイズを照会するコマンドの例は次の通りです。 ``` aws s3 ls s3://my-test-bucket \ --recursive \ --human-readable \ --summarize \ --endpoint-url=https://kr.ncloudstorage.com ``` ### 出力 アカウントが所有するすべてのバケットリストを照会する出力の例は次の通りです。 ``` 2026-08-21 14:06:10 my-encrypted-bucket 2026-08-19 11:57:28 my-locked-bucket 2026-08-21 14:06:07 my-sync-bucket 2026-08-19 11:44:27 my-test-bucket ``` バケット内のオブジェクトリストを照会する出力の例は次の通りです。 ``` PRE img/ 2026-08-19 11:56:40 12582912 large.bin 2026-08-19 11:44:28 48 sample.txt ``` バケット内のオブジェクトの総数とサイズを照会する出力の例は次の通りです。 ``` 2026-08-19 11:49:44 20 Bytes img/copy.png 2026-08-19 11:49:43 20 Bytes img/image.png 2026-08-19 11:49:44 20 Bytes img/image2.png 2026-08-19 11:56:40 12.0 MiB large.bin 2026-08-19 11:44:28 48 Bytes sample.txt Total Objects: 5 Total Size: 12.0 MiB ```