mac終端中顯示tree的命令

尋覓了良久終於找到了mac下如何在終端顯示tree的命令了,做爲從linux下轉過來的人,還沒適應mac的finder,仍是喜歡在命令行下查看文件。linux

命令:bash

find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'

而後手動alias一下,在你的.bash_profile或者.zshrc中添加:ui

alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'" 

搞定spa

http://the5fireblog.b0.upaiyun.com/staticfile/Snip20131105_23.png

要是能顯示顏色和控制層級就更好了。命令行

PS:也能夠經過brew install tree 安裝。code

相關文章
相關標籤/搜索