寻觅了良久终于找到了mac下如何在终端显示tree的命令了,作为从linux下转过来的人,还没适应mac的finder,还是喜欢在命令行下查看文件。

命令:

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

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

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

搞定

mac终端中显示tree的命令

要是能显示颜色和控制层级就更好了。

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

相关文章:

  • 2021-10-27
  • 2021-11-13
  • 2021-11-24
  • 2021-08-16
  • 2021-10-30
猜你喜欢
  • 2022-02-13
  • 2021-07-26
  • 2022-01-24
  • 2021-09-04
  • 2022-02-21
  • 2021-11-24
  • 2021-07-31
相关资源
相似解决方案