linux tree 命令

使用cmder确实是方便了很多,想看命令帮助信息:

$ help tree
以图形显示驱动器或路径的文件夹结构。

TREE [drive:][path] [/F] [/A]

   /F   显示每个文件夹中文件的名称。
   /A   使用 ASCII 字符,而不使用扩展字符。

看看区别

扩展字符显示

$ tree work /f                                      
卷 软件 的文件夹 PATH 列表                                   
卷序列号为 000E-E536                                     
D:APACHE TOMCAT9_X64WORK                          
└─Catalina                                          
    ├─boystyle.cn                                   
    │  ├─docs                                       
    │  ├─examples                                   
    │  ├─host-manager                               
    │  ├─manager                                    
    │  └─ROOT                                       
    ├─localhost                                     
    │  ├─docs                                       
    │  ├─examples                                   
    │  ├─host-manager                               
    │  ├─manager                                    
    │  └─ROOT                                       
    │      └─org                                    
    │          └─apache                             
    │              └─jsp                            
    │                      index_jsp.class          
    │                      index_jsp.java           
    │                                               
    └─qiuboai.com                                   
        ├─docs                                      
        ├─examples                                  
        ├─host-manager                              
        ├─manager                                   
        ├─qiuboai                                   
        └─ROOT                                      

ASCII字符显示,适合文本文件

$ tree work /f /a                                      
卷 软件 的文件夹 PATH 列表                                      
卷序列号为 000E-E536                                        
D:APACHE TOMCAT9_X64WORK                             
---Catalina                                           
    +---boystyle.cn                                    
    |   +---docs                                       
    |   +---examples                                   
    |   +---host-manager                               
    |   +---manager                                    
    |   ---ROOT                                       
    +---localhost                                      
    |   +---docs                                       
    |   +---examples                                   
    |   +---host-manager                               
    |   +---manager                                    
    |   ---ROOT                                       
    |       ---org                                    
    |           ---apache                             
    |               ---jsp                            
    |                       index_jsp.class            
    |                       index_jsp.java             
    |                                                  
    ---qiuboai.com                                    
        +---docs                                       
        +---examples                                   
        +---host-manager                               
        +---manager                                    
        +---qiuboai                                    
        ---ROOT                                       
原文地址:https://www.cnblogs.com/wancy86/p/6157946.html