Tree command to install and use

Tree brief order

  tree is a recursive directory listing command, resulting in a deep indented list file, which is the color of ALA dircolors if ls_colors setting environment variables and output are TTY. Trees have been transplanted and work under the operating system reports the following: Linux, FreeBSD, OS X operating system, Solaris, HP UX, Cygwin, HP NonStop OS / 2.

Tree command to install

  1. Download the installation package, address: http://mama.indstate.edu/users/ice/tree/

    

  2. Extract the installation

    1) under Linux (CentOS 6.5) installed

      . A decompression tree-1.7.0.tgz file, the command: tar -zxvf tree-1.7.0.tgz

      . B into the extracted directory, the command: cd tree-1.7.0

        

      . C installation file, the command: make install

        

      . D test using the command: tree

        

    2) Mac environment installation tree command

      . A decompression tree-1.7.0.tgz file, the command: tar -zxvf tree-1.7.0.tgz

      . B into the extracted directory, the command: cd tree-1.7.0, and use ls View

        

      c. Modify the tree configuration file Makefile. Wherein the right and left rows 55 Notes removed. As shown below

        

      . D After editing, execute the command: make

        

      e use administrator installation, command:. sudo cp tree / usr / local / bin /  

         

      . F test using the tree command: tree --version

        

Tree command

  Format: tree + parameters

复制代码
 1 tree命令行参数:
 2 
 3 -a 显示所有文件和目录。
 4 -A 使用ASNI绘图字符显示树状图而非以ASCII字符组合。
 5 -C 在文件和目录清单加上色彩,便于区分各种类型。
 6 -d 显示目录名称而非内容。
 7 -D 列出文件或目录的更改时间。
 8 -f 在每个文件或目录之前,显示完整的相对路径名称。
 9 -F 在执行文件,目录,Socket,符号连接,管道名称名称,各自加上"*","/","=","@","|"号。
10 -g 列出文件或目录的所属群组名称,没有对应的名称时,则显示群组识别码。
11 -i 不以阶梯状列出文件或目录名称。
12 -I 不显示符合范本样式的文件或目录名称。
13 -l 如遇到性质为符号连接的目录,直接列出该连接所指向的原始目录。
14 -n 不在文件和目录清单加上色彩。
15 -N 直接列出文件和目录名称,包括控制字符。
16 -p 列出权限标示。
17 -P 只显示符合范本样式的文件或目录名称。
18 -q 用"?"号取代控制字符,列出文件和目录名称。
19 -s 列出文件或目录大小。
20 -t 用文件和目录的更改时间排序。
21 -u 列出文件或目录的拥有者名称,没有对应的名称时,则显示用户识别码。
22 -x 将范围局限在现行的文件系统中,若指定目录下的某些子目录,其存放于另一个文件系统上,则将该子目录予以排除在寻找范围外。
复制代码

 

Guess you like

Origin www.cnblogs.com/meiko-zero/p/11129614.html