tree

cmd/tree

Show directory tree view

Overview

tree prints a directory tree view.

Useful options:

  • --depth limits traversal depth.
  • --all includes hidden entries.

Example usage:

tree
tree /users/alice/projects --depth=4
tree /config --all

Usage

  • tree [path] [--depth=N] [--all]

Flags

FlagTypeDescription
-all - Show hidden files
-depth int Maximum depth to display (default 3)

Exit Codes

CodeMeaning
0 Success
1 Runtime/command error
2 Invalid flags/usage