tree

用法:

tree
[-acdfghilnpqrstuvxACDFQNSUX]
[-H baseHREF]
[-T title ]
[-L level [-R]]
[-P pattern]
[-I pattern]
[-o filename]
[--version]
[--help]
[--inodes]
[--device]
[--noreport]
[--nolinks]
[--dirsfirst]
[--charset charset]
[--filelimit[=]#]
[--si]
[--timefmt[=]<f>]
[<directory list>]

选项:

参数 功能
-a 显示所有文件和目录。
-d 显示目录名称而非内容。
-l Follow symbolic links like directories.
-f 在每个文件或目录之前,显示完整的相对路径名称。
-x Stay on current filesystem only.
-L level Descend only level directories deep.
-R Rerun tree when max dir level reached.
-P pattern List only those files that match the pattern given.
-I pattern Do not list files that match the given pattern.
--noreport Turn off file/directory count at end of tree listing.
--charset X Use charset X for terminal/HTML and indentation line output.
--filelimit # Do not descend dirs with more than # files in them.
--timefmt <f> Print and format time according to the format <f>.
-o filename Output to file instead of stdout.

File options

参数 功能
-q Print non-printable characters as '?'.
-N Print non-printable characters as is.
-Q Quote filenames with double quotes.
-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.
--si Like -h, but use in SI units (powers of 1000).
-D Print the date of last modification or (-c) status change.
-F Appends '/', '=', '*', '@', '|' or '>' as per ls -F.
--inodes Print inode number of each file.
--device Print device ID number to which each file belongs.

排序功能

参数 功能
-v Sort files alphanumerically by version.
-r Sort files in reverse alphanumeric order.
-t Sort files by last modification time.
-c Sort files by last status change time.
-U Leave files unsorted.
--dirsfirst List directories before files (-U disables).

显示功能

参数 功能
-i Don't print indentation lines.
-A 使用ASNI绘图字符显示树状图而非以ASCII字符组合。
-S Print with ASCII graphics indentation lines.
-n Turn colorization off always (-C overrides).
-C 在文件和目录清单加上色彩,便于区分各种类型。

XML/HTML options

参数 功能
-X Prints out an XML representation of the tree.
-H baseHREF Prints out HTML format with baseHREF as top directory.
-T string Replace the default HTML title and H1 header with string.
--nolinks Turn off hyperlinks in HTML output.

其它功能

参数 功能
--version Print version and exit.
--help Print usage and this help message and exit.
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容