1
0
mirror of https://github.com/minio/docs.git synced 2025-04-22 19:02:57 +03:00
2022-09-16 16:40:20 -04:00

2.8 KiB

mc tree

minio

Table of Contents

mc tree

Syntax

The mc tree command lists all prefixes inside a MinIO bucket in a tree format. The command optionally supports listing all objects inside of bucket at each prefix, including the bucket root.

You can also use mc tree against a local filesystem directory to produce similar results to the tree commandline tool.

EXAMPLE

The following command prints a complete tree of all objects at any depth in the mydata bucket on the myminio MinIO deployment:

mc tree --files myminio/mydata

SYNTAX

The command has the following syntax:

mc [GLOBALFLAGS] tree                 \
                 [--depth int]        \
                 [--files]            \
                 [--rewind "string"]  \

Parameters

ALIAS

Required The alias <alias> of a MinIO deployment and the full path to the bucket to list the tree hierarchy. For example:

mc tree myminio/mybucket

You can specify multiple targets to the mc tree command. For example:

mc tree myminio/mybucket myminio/myotherbucket

For retrieving the tree heirarchy of a local filesystem directory, specify the full path to that directory. For example:

mc tree ~/minio/mydata/

--depth, d

Optional Limit the tree depth to the specified integer value.

Defaults to -1 or unlimited depth.

--files, f

Optional Includes files in the object or directory in the mc tree output.

--rewind

Examples

mc tree ALIAS/PATH
  • Replace ALIAS <mc tree ALIAS> with the alias <alias> of the MinIO deployment.
  • Replace PATH <mc tree ALIAS> with the path to the bucket on the MinIO deployment.

Behavior

S3 Compatibility