linux下的tree就比较强大了,但一般系统并不自带这个命令,需要手动下载安装:sudo apt-get install tree 。文件很小,只有31K,但功能可强大了!





 tree命令的参数解释,摘自http://www.linuxso.com/command/tree.html

-a 显示所有文件和目录。

-A 使用ASNI绘图字符显示树状图而非以ASCII字符组合。

-C 在文件和目录清单加上色彩,便于区分各种类型。

-d 显示目录名称而非内容。

-D 列出文件或目录的更改时间。

-f 在每个文件或目录之前,显示完整的相对路径名称。

-F 在执行文件,目录,Socket,符号连接,管道名称名称,各自加上"*","/","=","@","|"号。

-g 列出文件或目录的所属群组名称,没有对应的名称时,则显示群组识别码。

-i 不以阶梯状列出文件或目录名称。

-I 不显示符合范本样式的文件或目录名称。

-l 如遇到性质为符号连接的目录,直接列出该连接所指向的原始目录。

-n 不在文件和目录清单加上色彩。

-N 直接列出文件和目录名称,包括控制字符。

-p 列出权限标示。

-P 只显示符合范本样式的文件或目录名称。

-q 用"?"号取代控制字符,列出文件和目录名称。

-s 列出文件或目录大小。

-t 用文件和目录的更改时间排序。

-u 列出文件或目录的拥有者名称,没有对应的名称时,则显示用户识别码。

-x 将范围局限在现行的文件系统中,若指定目录下的某些子目录,其存放于另一个文件系统上,则将该子目录予以排除在寻找范围外。

usage: tree [-adfghilnpqrstuvxACDFNS] [-H baseHREF] [-T title ] [-L level [-R]]

    [-P pattern] [-I pattern] [-o filename] [--version] [--help] [--inodes]

    [--device] [--noreport] [--nolinks] [--dirsfirst] [--charset charset]

    [--filelimit #] [<directory list>]

  -a            All files are listed.

  -d            List directories only.

  -l            Follow symbolic links like directories.

  -f            Print the full path prefix for each file.

  -i            Don't print indentation lines.

  -q            Print non-printable characters as '?'.

  -N            Print non-printable characters as is.

  -p            Print the protections for each file.

  -u            Displays file owner or UID number.

  -g            Displays file group owner or GID number.

  -s            Print the size in bytes of each file.

  -h            Print the size in a more human readable way.

  -D            Print the date of last modification.

  -F            Appends '/', '=', '*', or '|' as per ls -F.

  -v            Sort files alphanumerically by version.

  -r            Sort files in reverse alphanumeric order.

  -t            Sort files by last modification time.

  -x            Stay on current filesystem only.

  -L level      Descend only level directories deep.

  -A            Print ANSI lines graphic indentation lines.

  -S            Print with ASCII graphics indentation lines.

  -n            Turn colorization off always (-C overrides).

  -C            Turn colorization on always.

  -P pattern    List only those files that match the pattern given.

  -I pattern    Do not list files that match the given pattern.

  -H baseHREF   Prints out HTML format with baseHREF as top directory.

  -T string     Replace the default HTML title and H1 header with string.

  -R            Rerun tree when max dir level reached.

  -o file       Output to file instead of stdout.

  --inodes      Print inode number of each file.

  --device      Print device ID number to which each file belongs.

  --noreport    Turn off file/directory count at end of tree listing.

  --nolinks     Turn off hyperlinks in HTML output.

  --dirsfirst   List directories before files.

  --charset X   Use charset X for HTML and indentation line output.
--filelimit # Do not descend dirs with more than # files in them.

Linux tree 命令用法的更多相关文章

  1. Linux tree命令

    Linux tree命令用于以树状图列出目录的内容. 执行tree指令,它会列出指定目录下的所有文件,包括子目录里的文件. 语法 tree [-aACdDfFgilnNpqstux][-I <范 ...

  2. linux mail命令用法

    在Linux系统下mail命令的测试 1. 最简单的一个例子: mail -s test admin@aispider.com 这条命令的结果是发一封标题为test的空信给后面的邮箱,如果你有mta并 ...

  3. [转帖]linux tree命令--显示目录的树形结构

    linux tree命令--显示目录的树形结构    版权声明:iamqilei@qq.com https://blog.csdn.net/u011729865/article/details/533 ...

  4. (转)linux paste命令用法详解

    linux paste命令用法详解原文:http://www.xfcodes.com/linuxcmd/mulu/10211.htmlinux下paste命令,可用于合并文件的列. 功能说明:合并文件 ...

  5. 【转】linux tree命令以树形结构显示文件目录结构 ---- 不错

    原文网址:http://jingyan.baidu.com/article/acf728fd19c7eff8e510a3eb.html 今天小编来给分享Linux 系统下一个非常有用的命令的使用:tr ...

  6. Linux tree 命令乱码

    今天在执行Linux下的tree命令的时候,出现了乱码.上网查了一下说需要使用tree --charset ASCII,强制使用ASCII字符.这样确实可以输出正常了.但是我的环境里的LANG=US. ...

  7. Linux——基础命令用法(下)

    一.linux用户 1.什么是用户 用户是用来运行某一些进程.拥有某一些文件或目录. 在Linux里面,用户分成三大类:root用户.系统用户.普通用户. 用户是用UID来唯一标识身份的,且root用 ...

  8. Linux——基础命令用法(上)

    一.Linux基础命令 1.Linux命令行的格式 命令行的格式为:用户名+主机名+当前工作目录 输入内容的命令格式为:命令 [-短选项/--长选项] [参数] [root@localhost ~]# ...

  9. linux wget 命令用法详解(附实例说明)

    Linux wget是一个下载文件的工具,它用在命令行下.对于Linux用户是必不可少的工具,尤其对于网络管理员,经常要下载一些软件或从远程服务器恢复备份到本地服务器   Linux wget是一个下 ...

随机推荐

  1. less新手入门(五)—— CssGuards、循环、合并

    九. CssGuards 警卫也可以应用于css选择器,这是一种语法糖,用于声明mixin,然后立即调用它. 例如,在1.5.0之前,您必须这样做 .my-optional-style() when ...

  2. POJ 2773 欧几里得

    思路: 若a和b互素的话,则b*t+a和b一定互素 用周期性做就好了 //By SiriusRen #include <cstdio> using namespace std; ],m,k ...

  3. 最大化最小值poj2456Aggressive cows

    Aggressive cows Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 15528   Accepted: 7440 ...

  4. OpenSSL 1.0.0生成p12、jks、crt等格式证书的命令个过程

    OpenSSL 1.0.0生成p12.jks.crt等格式证书的命令个过程   此生成的证书可用于浏览器.java.tomcat.c++等.在此备忘!     1.创建根证私钥命令:openssl g ...

  5. 致创业者:APP已死 服务永生

    前几日,有位创业者和我讲他在带领团队做一个将爱踢球的人集中在一起的App,我告诉他你的创业方向错了.原因在于你的目的是要为爱踢球的人提供服务,而你现在却在竭尽全力的做App,你应该做的是设计你为爱踢球 ...

  6. A8ERP配送管理系统

  7. C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(249,5): error MSB6006: “CL.exe”已退出,代码为 -1073741515。

    解决: Add this to your PATH environment variables: C:\Program Files (x86)\Microsoft Visual Studio 11.0 ...

  8. RecylerView为item添加点击事件

    RecyclerView侧重的是布局的灵活性,虽说可以替代ListView但是连基本的点击事件都没有,这篇文章就来详细讲解如何为RecyclerView的item添加点击事件. 1 原理: 为Recy ...

  9. 微信关于网页授权access_token和普通access_token的区别

    微信官网网址:https://mp.weixin.qq.com/wiki/17/c0f37d5704f0b64713d5d2c37b468d75.html#.E9.99.84.EF.BC.9A.E6. ...

  10. mongo 3.4分片集群系列之一:浅谈分片集群

    这篇为理论篇,稍后会有实践篇. 这个系列大致想跟大家分享以下篇章: 1.mongo 3.4分片集群系列之一:浅谈分片集群 2.mongo 3.4分片集群系列之二:搭建分片集群--哈希分片 3.mong ...