Install tree command on MacOS

You can get the tree command on macOS, too. If you have Homebrew, all you need to do is run:

brew install tree

Tree Command Usages

1. By default, if no argument is provided to tree command, it prints tree of current directory.

usr_name:Deep-learning-for-sentiment-analysis admin$ tree

2. To see only directories:

$ tree -d

3. Limit the level or depth of recursion:

$ tree -L 2

4.  Show all files including hidden dot files:

$ tree -a  -L 2