[Turn]http://blog.csdn.net/jeanphorn/article/details/46550619
1. Description of the problem
It is believed that many users who have used Linux have used tree
commands, which can display the directory structure as clearly as the Windows File Manager. But there is not the system itself, if necessary, Ubuntu can be installed under the following command.
sudo apt-get install tree
So in Mac OS X system if you want to use tree This command, you can refer to the following solution.
2. Solution
First, go to the home directory (available commands cd $home
), use the VIM command to create a . BASHRC file, and add the following line of code inside it:
alias tree="find . -print | sed -e ‘s;[^/]*/;|____;g;s;____|; |;g‘"
After saving the exit, use the source .bashrc
command to update the script resources, this is again under the terminal to try the tree command, see if it is successful!! ^_^
Mac OS x terminal uses the tree command column directory