---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.6
alternate:
  - https://ydb.tech/docs/en/reference/ydb-cli/commands/scheme-ls.md
  - https://ydb.tech/docs/ru/reference/ydb-cli/commands/scheme-ls.md
sourcePath: en/core/reference/ydb-cli/commands/scheme-ls.md
---
> **Documentation Index:** Fetch the complete configuration index at https://ydb.tech/docs/en/llms.txt

<!-- source: en/reference/ydb-cli/commands/_includes/scheme-ls.md -->
# List of objects

The `scheme ls` command lets you get a list of [scheme objects](https://ydb.tech/docs/en/concepts/glossary.md#scheme-object) in the database:

```bash
ydb [connection options] scheme ls [path] [-lR1]
```

<!-- source: en/reference/ydb-cli/commands/_includes/conn_options_ref.md -->
where [connection options] are [database connection options](https://ydb.tech/docs/en/reference/ydb-cli/connect.md#command-line-pars)
<!-- endsource: en/reference/ydb-cli/commands/_includes/conn_options_ref.md -->

Executing the command without parameters produces a compressed list of object names in the database's root directory.

In the `path` parameter, you can specify the [directory](https://ydb.tech/docs/en/reference/ydb-cli/commands/dir.md) you want to list objects in.

The following options are available for the command:

* `-l`: Full details about attributes of each object.
* `-R`: Recursive traversal of all subdirectories.
* `-1`: Output a single schema object per row (for example, to be later handled in a script).

## Examples

<!-- source: en/_includes/ydb-cli-profile.md -->
{% note info %}

The examples use the `quickstart` profile. To learn more, see [Creating a profile to connect to a test database](https://ydb.tech/docs/en/reference/ydb-cli/profile/create.md#quickstart).

{% endnote %}
<!-- endsource: en/_includes/ydb-cli-profile.md -->

- Getting objects from the root database directory in a compressed format

```bash
ydb --profile quickstart scheme ls
```

- Getting objects in all database directories in a compressed format

```bash
ydb --profile quickstart scheme ls -R
```

- Getting objects from the given database directory in a compressed format

```bash
ydb --profile quickstart scheme ls dir1
ydb --profile quickstart scheme ls dir1/dir2
```

- Getting objects in all subdirectories in the given directory in a compressed format

```bash
ydb --profile quickstart scheme ls dir1 -R
ydb --profile quickstart scheme ls dir1/dir2 -R
```

- Getting complete information on objects in the root database directory

```bash
ydb --profile quickstart scheme ls -l
```

- Getting complete information about objects in a given database directory

```bash
ydb --profile quickstart scheme ls dir1 -l
ydb --profile quickstart scheme ls dir2/dir3 -l
```

- Getting complete information about objects in all database directories

```bash
ydb --profile quickstart scheme ls -lR
```

- Getting complete information on objects in all subdirectories of a given database directory

```bash
ydb --profile quickstart scheme ls dir1 -lR
ydb --profile quickstart scheme ls dir2/dir3 -lR
```
<!-- endsource: en/reference/ydb-cli/commands/_includes/scheme-ls.md -->
