About Listing Directory Tree

You can list the structure of files and directories of the project in the Terminal using the tree tool:

1
$ tree --dirsfirst -F > tree.txt
  • --dirfirst makes the directories appear before files
  • -F appends slash to the directories and * to the executable files

Tips and Tricks Dev Ops Architecture Bash Zsh