Tree: 列出树形目录和文件

原贴:http://linuxtoy.org/archives/tree.html

Tree: 列出树形目录和文件

<script type="text/javascript"><!-- google_ad_client = "pub-9432205671574187"; //LT, 300x250 google_ad_slot = "9869120281"; google_ad_width = 300; google_ad_height = 250; //--></script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"> </script> <script src="http://pagead2.googlesyndication.com/pagead/expansion_embed.js"></script> <script src="http://googleads.g.doubleclick.net/pagead/test_domain.js"></script> <script>window.google_render_ad();</script>

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

Tree

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

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

Tree

{ 感谢 shuge.lee 推荐 }

署名 • 注明出处 • 非商业性使用

11 Comments

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

    那东西叫pstree

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

    s/ptree/pstree/ ?

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

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

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

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

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

    这tree不好用,中文不行

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

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

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

    呵呵,郭德纲还用gmail呢?

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

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

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

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

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

    @Kardinal: 我这边可以啊。

    @bones7456: 可以呀。

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

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

 

发布了75 篇原创文章 · 获赞 35 · 访问量 369万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章