Command Line
Not found of OS X default tree command, this command line similar to the effect of the tree...
$ find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
... like this
. |____extra | |____httpd-autoindex.conf | |____httpd-dav.conf | |____httpd-default.conf | |____httpd-info.conf | |____httpd-languages.conf | |____httpd-manual.conf | |____httpd-mpm.conf | |____httpd-multilang-errordoc.conf | |____httpd-ssl.conf | |____httpd-userdir.conf | |____httpd-vhosts.conf |____httpd.conf |____magic |____mime.types |____original | |____extra | | |____httpd-autoindex.conf | | |____httpd-dav.conf | | |____httpd-default.conf | | |____httpd-info.conf | | |____httpd-languages.conf | | |____httpd-manual.conf | | |____httpd-mpm.conf | | |____httpd-multilang-errordoc.conf | | |____httpd-ssl.conf | | |____httpd-userdir.conf | | |____httpd-vhosts.conf | |____httpd.conf |____other | |____php5.conf |____users
Add alias to ~/.bash_profile
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
Install via Homebrew
Use Homebrew to install tree command, first you need to install Homebrew, you can reference Install Homebrew on OS X.
Install tree
$ brew install tree
Uninstall tree
$ brew uninstall tree