Tre is a free and open source alternative to the tree command for Linux, Windows and MacOS. Using Tre, you can list directory and files in a tree like diagram in your terminal application. It is written in Rust and released under MIT License. It skips ignored files in git as per .gitignore setting and creates shell aliases and gives color output in terminal.
How to install Tre Command on Ubuntu
sudo apt install tre-command
After the successful installation of tre, run below command. It will list all files and directories.
tre
To list all files and directories, including hidden ones, run below command.
tre -a
To list only list directories in output, run below command.
tre -d
For the complete help details run below command.
tre -h