Tree: 列出树形目录和文件

Tree 这个小工具可以让你在 Linux 下列出树形的目录和文件。它支持递归目录,并能够产生色彩化的输出。在我的系统上执行 tree bin 后的效果如下图所示。

Tree

通过 man tree,你可以了解 Tree 的重要选项说明。

忽然想到另一个有点类似的程序 pstree,它可以输出进程树,也很有意思。

Tree

{ 感谢 shuge.lee 推荐 }

Read More:

22 Comments

  1. 1 zhuqin Commented @ 2009-04-17 9:02Reply to this comment

    那东西叫pstree

  2. 2 LI Daobing Commented @ 2009-04-17 9:02Reply to this comment

    s/ptree/pstree/ ?

  3. 3 Toy Commented @ 2009-04-17 9:07Reply to this comment

    @zhuqin, @LI Daobing: 谢谢二位指正。

  4. 4 wd Commented @ 2009-04-17 9:07Reply to this comment

    我和楼上几位的目的是一样的。。

  5. 5 bones7456 Commented @ 2009-04-17 9:33Reply to this comment

    这tree不好用,中文不行

  6. 6 Kardinal Commented @ 2009-04-17 9:49Reply to this comment

    gmail 不能访问了!!! 但 google 和 reader 还能访问…… 要了亲命了!!!

  7. 7 weishen Commented @ 2009-04-17 9:54Reply to this comment

    呵呵,郭德纲还用gmail呢?

  8. 8 ydddd Commented @ 2009-04-17 9:55Reply to this comment

    财神爷的㞎㞎,好屎。我这里中文也正常(locale=en_US.utf-8)。

  9. 9 ivenvd Commented @ 2009-04-17 9:56Reply to this comment

    这个早知道啦,呵呵,看原代码前先执行下这个

  10. 10 Toy Commented @ 2009-04-17 10:07Reply to this comment

    @Kardinal: 我这边可以啊。

    @bones7456: 可以呀。

  11. 11 volans Commented @ 2009-04-17 10:20Reply to this comment

    这个我用了有三年多了……很好用!

  12. 12 Ian Commented @ 2009-04-17 10:21Reply to this comment

    alias tree='tree -CFA -I ".git" --dirsfirst'

  13. 13 Jimmy Commented @ 2009-04-17 10:46Reply to this comment

    楼主用的是x-shell ??

  14. 14 Jimmy Commented @ 2009-04-17 10:53Reply to this comment

    什么终端 软件 ? 样子很好看,呵呵~~

  15. 15 LI Daobing Commented @ 2009-04-17 11:19Reply to this comment

    @bones7456: tree -N

  16. 16 YCF.name Commented @ 2009-04-17 12:43Reply to this comment

    pstree在conky效果很好的!

  17. 17 Toy Commented @ 2009-04-17 12:57Reply to this comment

    @Jimmy: zsh,字体是 Droid Sans Mono。

  18. 18 oomengnan Commented @ 2009-04-17 13:14Reply to this comment

    这篇文章突然介绍个命令。还要是不准确的。 感觉有点别扭。

  19. 19 bones7456 Commented @ 2009-04-17 14:19Reply to this comment

    @LI Daobing: 恩,好使了~

  20. 20 OwnLinux Commented @ 2009-04-17 22:56Reply to this comment

    OwnLinux 无偿转让,诚邀爱好者接管

    诚心希望有哪个朋友能把 OwnLinux 接管过去让它继续成长。

    http://www.ownlinux.cn/2009/04/17/ownlinux-4/

  21. 21 solary Commented @ 2009-04-18 2:02Reply to this comment

    多谢介绍! 以前就想用类似的软件,不过不知道。

  22. 22 糊涂 Commented @ 2009-04-18 13:14Reply to this comment

    说到进程树,htop简单设置就能做到,还是实时动态的(这儿能贴图么?)