tree: 查看目录结构

tree常见命令参数

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.

常用的命令展示

查看某一个目录的文件结构

[root@localhost ~]# tree /home/omc/ftl

只显示一层目录

[root@localhost ~]# tree -L 1  -d /home/omc/ftl
[root@localhost ~]# tree -Ld 1 /home/omc/ftl 【效果同上】

利用find只查找一层目录

[root@localhost ~]# findfind /home/omc/ftl -maxdepth 1 -type d       最大深度为1

Linux tree命令详解的更多相关文章

  1. linux shell 脚本攻略学习16--wc命令详解,tree命令详解

    在文本处理的工作中,统计文件的行数,单词数和字符数非常有用.而对于开发人员本身来说,统计LOC(line of code ,代码行数)是一件重要的工作.linux中有什么命令可以帮助我们做统计呢?没错 ...

  2. CentOS tree命令详解

    inux下tree命令详解---linux以树状图逐级列出目录的内容命令 ############################################################### ...

  3. linux awk命令详解

    linux awk命令详解 简介 awk是一个强大的文本分析工具,相对于grep的查找,sed的编辑,awk在其对数据分析并生成报告时,显得尤为强大.简单来说awk就是把文件逐行的读入,以空格为默认分 ...

  4. linux cat 命令详解

    linux cat 命令详解 http://linux.chinaunix.net/techdoc/system/2007/11/16/972467.shtml adb shell su //这个不一 ...

  5. 【初级】linux rm 命令详解及使用方法实战

    rm:删除命令 前言: windows中的删除命令大家都不陌生,linux中的删除命令和windows中有一个共同特点,那就是危险,前两篇linux mkdir 命令详解及使用方法实战[初级]中我们就 ...

  6. Linux netstat命令详解

    Linux netstat命令详解 一  简介 Netstat 命令用于显示各种网络相关信息,如网络连接,路由表,接口状态 (Interface Statistics),masquerade 连接,多 ...

  7. linux grep命令详解

    linux grep命令详解 简介 grep (global search regular expression(RE) and print out the line,全面搜索正则表达式并把行打印出来 ...

  8. Linux chmod命令详解

    Linux chmod命令详解 chmod----改变一个或多个文件的存取模式(mode)   chmod [options] mode files   只能文件属主或特权用户才能使用该功能来改变文件 ...

  9. 【转发】linux yum命令详解

    linux yum命令详解 yum(全 称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器.基於RPM包管理, ...

随机推荐

  1. FindBugs:Java 静态代码检查

    在使用 Jenkins 构建 Java Web 项目时候,有一项叫做静态代码检查,是用内置的 findBugs 插件,对程序源代码进行检查,以分析程序行为的技术,应用于程序的正确性检查. 安全缺陷检测 ...

  2. 笔记五:python字符串

    一:学习内容 字符串类型 字符串类型判断 字符串类型互转 字符串小练习 二:字符串类型 1. basestring 在python中和字符串相关的数据类型为:str和unicode,他们都是bases ...

  3. 前端性能优化---缓存篇SDK

    1.把前端最常用的资源css.js存在本地1.1  前端缓存技术SessionStorage 优点:临时存储神器,关闭页面标签自动回收,不可以跨页面交互. 取值的时候有两种方法,一种是用session ...

  4. [android] 手机卫士接收打电话广播显示号码归属地

    使用广播接收者接收打电话的意图,显示号码归属地 新建一个类OutCallReceiver继承系统的BroadcastReceiver 重写onReceive()方法 调用getResultData() ...

  5. dubbo的重试机制

    对dubbo熟悉的人对下面的配置一定不会陌生: <dubbo:reference id="xxxx" interface="xx" check=" ...

  6. Linux下socket通信和多线程

    服务端socket流程:socket() –> bind() –> listen() –> accept() –> 读取.发送信息(recv,send等) 客户端socket流 ...

  7. graphviz 的节点形状

    graphviz 的节点可以定义不同的外形,比如下面的定义, digraph tt1{     a[shape=box];     c[shape=lpromoter];     d[shape=do ...

  8. PL/SQL Developer图形化窗口创建数据库(表空间和用户)以及相关查询sql

    前言:上一篇安装好oracle和pl/sql后,这篇主要讲如何创建数据库,因为接下来我的项目会连接数据库进行开发. 第一步.先用系统管理员登录pl/sql 我这里系统管理员用户名为system,密码为 ...

  9. Go 语言实现 HTTP 层面的反向代理

    最近对 Go 语言的反向代理使用得偏多,其实在大概两年前就写过 TCP 层面的代理,而且那时也是用的 Go 语言,不同之处在于之前只是偶尔尝试一下使用,最近是因为工作需要使用的.相比较于 TCP 层面 ...

  10. CodeForces760A

    A. Petr and a calendar time limit per test:2 seconds memory limit per test:256 megabytes input:stand ...