mc ls

Lists buckets and objects on a local cluster.

Syntax

Use the command to list buckets and objects from the local cluster.

CLI
mc ls [FLAGS] TARGET [TARGET ...]

FLAGS:
  --account value               list buckets of the account
  --versions                    list all versions
  --recursive, -r               list recursively
  --summarize                   display summary information (number of objects, total size)
  --json                        enable JSON lines formatted output
  --debug                       enable debug output
  --insecure                    disable SSL certificate verification
  --help, -h                    show help

Parameters

Parameter Description
TARGET The alias of a configured HPE Ezmeral Object Store deployment from which the command lists buckets and objects. This parameter is mandatory.
account The account from which buckets and objects are listed. If not specified, buckets and objects from all accounts are listed.
versions List all versions of an object, including those with delete markers.
recursive Recursively lists objects from all folders and not just the top level folder.
summarize Display the total size and number of objects in the target.
json Enable JSON formatted output.
debug Enable output for debugging.
insecure Disable SSL verification.
help Show this help.

Examples

  1. List buckets in the object store deployment with alias salesobject:
    CLI
    /opt/mapr/bin/mc ls salesobject -json
  2. List all buckets in the account asia in the object store deployment with alias salesobject:
    CLI
    /opt/mapr/bin/mc ls --account asia salesobject -json
  3. List all buckets recursively from the object store deployment with alias salesobject:
    CLI
    /opt/mapr/bin/mc ls --recursive salesobject -json
  4. List all buckets recursively from the object store deployment with alias salesobject and display the total number of objects and the total size:
    CLI
    /opt/mapr/bin/mc ls --recursive --summarize salesobject -json