1
0
mirror of https://github.com/minio/docs.git synced 2025-08-06 14:42:56 +03:00
Files
docs/source/reference/minio-mc/mc-tree.rst
Andrea Longo 1f8ce6dec2 Add reference page for mc du (#783)
Create a new reference page for `mc du` and link it in the list of `mc`
commands.

Staged:

http://192.241.195.202:9000/staging/DOCS-764/linux/html/reference/minio-mc/mc-du.html

Includes drive-by fixes to make the _Optional_ notations appear in a
more consistent manner. (Including several otherwise unrelated pages.)
There's more opportunistic fixes here than I might normally do in the
same PR, but seemed better to get it over with.

Fixes https://github.com/minio/docs/issues/764

---------

Co-authored-by: Ravind Kumar <ravind@min.io>
2023-03-30 13:36:41 -06: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