mac终端中显示tree的命令

命令:

<!-- lang: shell -->
find . -print | sed -e 's;[^/]*/;|__;g;s;__|; |;g'

然后手动alias一下,在你的.bash_profile或者.zshrc中添加:

<!-- lang: shell -->
alias tree="find . -print | sed -e 's;[^/]*/;|__;g;s;__|; |;g'"

搞定

PS:也可以通过brew install tree 安装

你可能感兴趣的:(mac,tree)