MAC终端显示tree命令

方法一:

命令:

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

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

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

 

方法二:

 在终端通过brew安装tree,

命令: brew install tree 

TingdeMacBook-Pro-2:sdk ting$ tree -help
tree: Invalid argument -`e'.
usage: tree [-acdfghilnpqrstuvxACDFJQNSUX] [-H baseHREF] [-T title ]
    [-L level [-R]] [-P pattern] [-I pattern] [-o filename] [--version]
    [--help] [--inodes] [--device] [--noreport] [--nolinks] [--dirsfirst]
    [--charset charset] [--filelimit[=]#] [--si] [--timefmt[=]<f>]
    [--sort[=]<name>] [--matchdirs] [--ignore-case] [--] [<directory list>]

 

posted @ 2015-06-24 15:58  Cathyhi  阅读(1154)  评论(0编辑  收藏  举报