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萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章