Original: http://superuser.com/questions/359723/mac-os-x-equivalent-of-the-ubuntu-tree-command/
The finishing steps are as follows:
$ tree-Bash:tree:command not found$sudo mkdir-p/usr/local/binpassword:$sudonano/usr/local/bin/Tree------------copied below into the Nano editor-------------#!/bin/Bashsedmagic='s; [^/]*/;|____;g;s;____|; |; G'if["$#"-gt0] ; Thendirlist="[email protected]"Elsedirlist="."fi forXinch$dirlist; Do Find "$x"-print |sed-E"$SEDMAGIC" Done------------Copy the above into the Nano editor-------------$ sudo chmod 755/usr/local/bin/tree$ Nano~/. Bash_profile------------copied below into the Nano editor-------------Export PATH="/usr/local/bin: $PATH"------------Copy the above into the Nano editor-------------$ tree~/desktop/| | | |____| | | | |____. Ds_store| | | | |____.localized| | | | |____readme.txt$
Add a tree command to a MAC terminal