Welcome to the upcoming version of the MinIO Documentation! The content on this page is under active development and may change at any time. If you can't find what you're looking for, check our legacy documentation. Thank you for your patience.

mc tree

Table of Contents


The mc tree command lists buckets and directories in a tree format.

  • When applied to an S3-compatible service bucket, mc tree returns a tree listing of the bucket and all bucket prefixes.

  • When applied to a local filesystem directory, mc tree returns a tree listing of the directory and all of its subdirectories.


mc tree ALIAS/PATH
  • Replace ALIAS with the alias of the S3-compatible host.

  • Replace PATH with the path to the bucket on the S3-compatible host.


tree has the following syntax:

mc tree [FLAGS] TARGET [TARGET...]

tree supports the following arguments:


Required The full path to an S3-compatible service bucket or local filesystem directory.

For objects on an S3-compatible service, specify the alias of a configured service as the prefix to the TARGET path. For example:

mc stat [FLAGS] play/mybucket
--files, --f

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


Directs mc tree to operate only on the object version(s) that existed at specified point-in-time.

  • To rewind to a specific date in the past, specify the date as an ISO8601-formatted timestamp. For example: --rewind "2020.03.24T10:00".

  • To rewind a duration in time, specify the duration as a string in #d#hh#mm#ss format. For example: --rewind "1d2hh3mm4ss".

--rewind requires that the specified --TARGET be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.