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. echarts-gl 3D柱状图保存为图片,打印

    echarts-gl生成的立体柱状图生成图片是平面的,但是需求是3D图并且可以打印,我们的思路是先转成图片,然后再打印,代码如下: 生成3D图 <td>图表分析</td> &l ...

  2. 公司5:JrVue表格

    组件名称:jr-dynamic-query-table 组件布局 table组件名称:  jr-dynamic-query-table 分页组件名称: el-pagination <div re ...

  3. 关于Android皮肤更换分享

    http://www.eoeandroid.com/forum.php?mod=viewthread&tid=264902&highlight=%E6%8D%A2%E8%82%A4&a ...

  4. 递推 Codeforces Round #186 (Div. 2) B. Ilya and Queries

    题目传送门 /* 递推:用cnt记录前缀值,查询区间时,两个区间相减 */ #include <cstdio> #include <algorithm> #include &l ...

  5. mysqli 进一步分析

    1. 一.mysql与mysqli的概念相关: 1.mysql与mysqli都是php方面的函数集,与mysql数据库关联不大. 2.在php5版本之前,一般是用php的mysql函数去驱动mysql ...

  6. pyinstaller遇到的坑

    最近接了一个python的活,具体的就不展开,大概就是需要搭建一个服务器,接收客户端上传文件,调用算法模型,然后返回相应的数据.算法模块用的是tensorflow模块,里面一大堆东西,网上看了很多,最 ...

  7. 全面学习ORACLE Scheduler特性(6)设置Repeat Interval参数

    3.3 设置Repeat Interval Job 和Schedule中REPEAT_INTERVAL参数都是用来控制执行的频率或周期,虽然说周期是一个时间性概念,不过REPEAT_INTERVAL指 ...

  8. WordPress百度熊掌号页面改造(纯代码实现)

    一.粉丝关注改造 1.添加熊掌号ID声明 ID声明 <script src="//msite.baidu.com/sdk/c.js?appid=你的熊掌ID">< ...

  9. Linux 学习(二)

    Linux相关命令 命令 说明 startx 当前用户界面切换至图形界面 init5 切换至另一用户的图形化界面 init3 从图形界面切换回文本界面 pwd 显示当前用户路径 logout 注销 s ...

  10. ubuntu系统nginx+Redis+PHP

    一.安装ngnix apt-get update sudo apt-get install nginx /etc/init.d/nginx start 二.安装php sudo apt-get ins ...