Tree

Installation

To install the latest version, use homebrew:

brew install tree

Usage

Running tree will produce output like this:

$ tree

.
β”œβ”€β”€ Apps
β”‚   β”œβ”€β”€ Octave.md
β”‚   β”œβ”€β”€ README.md
β”‚   β”œβ”€β”€ Settings.md
β”‚   β”œβ”€β”€ araxis-merge.jpg
β”‚   β”œβ”€β”€ beyond-compare.png
β”‚   β”œβ”€β”€ delta-walker.jpg
β”‚   β”œβ”€β”€ filemerge.png
β”‚   └── kaleidoscope.png
β”œβ”€β”€ CONTRIBUTING.md
β”œβ”€β”€ Cpp
β”‚   └── README.md
β”œβ”€β”€ Docker
β”‚   └── README.md
β”œβ”€β”€ Git
β”‚   β”œβ”€β”€ README.md
β”‚   └── gitignore.md
└── Go
    └── README.md

5 directories, 14 files

To limit the recursion you can pass an -L flag and specify the maximum depth tree will use when searching.

tree -L 1

will output:

.
β”œβ”€β”€ Apps
β”œβ”€β”€ CONTRIBUTING.md
β”œβ”€β”€ Cpp
β”œβ”€β”€ Docker
β”œβ”€β”€ Git
└── Go

5 directories, 1 files

Last updated

Was this helpful?