標籤:des style c color int strong
tree --help 以樹型結構顯示檔案及檔案夾
usage: 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>]
------- Listing options -------
-a All files are listed. #顯示所有檔案
-d List directories only. #僅顯示檔案件,不顯示檔案
-l Follow symbolic links like directories.
-f Print the full path prefix for each file.
-x Stay on current filesystem only. #將範圍局限在現行的檔案系統中,若指定目錄下的某些子目錄,其存放於另一個檔案系統上,則將該子目錄予以排除在尋找範圍外。
-L level Descend only level directories deep. #顯示N層目錄
-R Rerun tree when max dir level reached.
-P pattern List only those files that match the pattern given. #只顯示符合"pattern"的檔案或目錄名稱
-I pattern Do not list files that match the given pattern. #不顯示符合範本樣式的檔案或目錄名稱 tree -I "*.c"
--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.
------- Sorting options -------
-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).
------- Graphics options ------
-i Don‘t print indentation lines. #不以階梯狀列出檔案或目錄名稱
-A Print ANSI lines graphic indentation lines. #使用ASNI繪圖字元顯示樹狀圖而非以ASCII字元組合
-S Print with ASCII graphics indentation lines.
-n Turn colorization off always (-C overrides). #不在檔案和目錄清單加上色彩
-C Turn colorization on always. #在檔案和目錄清單加上色彩,便於區分各種類型
------- 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.
---- Miscellaneous options ----
--version Print version and exit.
--help Print usage and this help message and exit.