linux-tree命令
jzztf opened this issue · 1 comments
jzztf commented
- 寻求帮助
$ tree --help
- 常用
$ tree -L 3 # 三级目录 $ tree -h # 展示文件大小
jzztf commented
usage: tree [-acdfghilnpqrstuvxACDFJQNSUX] [-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>]
[--sort[=]<name>] [--matchdirs] [--ignore-case] [--] [<directory list>]
------- 列表选项 -------
-a 列出所有文件
-d 列出所有目录
-l Follow symbolic links like directories.
-f 显示所有文件路径
-x Stay on current filesystem only.
-L level 向下列出"level"级的目录
-R 向下列出所有文件
-P pattern 列出所有符合匹配模式的内容
-I pattern 所有符合匹配模式的内容都不列出
--ignore-case 当模式匹配时忽略大小写
--matchdirs -P模式匹配时同时匹配目录
--noreport 关闭末尾文件及文件目录计数
--charset X Use charset X for terminal/HTML and indentation line output.
--filelimit # 目录向下如果文件数超过#就停止
--timefmt <f> Print and format time according to the format <f>.
-o filename 输出到文件替代标准输出(相当于`tree > filename`)
-------- 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.
------- Sorting options -------
-v Sort files alphanumerically by version.
-t Sort files by last modification time.
-c Sort files by last status change time.
-U 不排序
-r 排序取反.
--dirsfirst 将所有目录前置 (-U 取消).
--sort X Select sort: name,version,size,mtime,ctime.
------- Graphics options ------
-i Don't print indentation lines.
-A Print ANSI lines graphic indentation lines.
-S Print with CP437 (console) graphics indentation lines.
-n Turn colorization off always (-C overrides).
-C Turn colorization on always.
------- XML/HTML/JSON options -------
-X Prints out an XML representation of the tree.
-J Prints out an JSON 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.
---- Miscellaneous options ----
--version 打印版本并退出
--help 打印帮助信息并退出
-- Options processing terminator.