tree <folders>

Display directories as trees (with optional color/HTML output)

Arguments

NameDescription
foldersfolders

Options

NameDescription
-aAll files are listed
-dList directories only
-lFollow symbolic links like directories
-fPrint the full path prefix for each file
-xStay on current filesystem only
-L <level>Descend only level directories deep
-RRerun 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
--ignore-caseIgnore case when pattern matching
--matchdirsInclude directory names in -P pattern matching
--noreportTurn off file/directory count at end of tree listing
--charset <charset>Use charset X for terminal/HTML and indentation line output
--filelimit <number>Do not descend dirs with more than # files in them
--timefmt <format>Print and format time according to the format <f>
-o <filename>Output to file instead of stdout
-qPrint non-printable characters as '?'
-NPrint non-printable characters as is
-QQuote filenames with double quotes
-pPrint the protections for each file
-uDisplays file owner or UID number
-gDisplays file group owner or GID number
-sPrint the size in bytes of each file
-hPrint the size in a more human readable way
--siLike -h but use SI units (powers of 1000) instead
--duFor each directory report its size as the accumulation of sizes of all its files and sub-directories (and their files, and so on). The total amount of used space is also given in the final report (like the 'du -c' command.) This option requires tree to read the entire directory tree before emitting it, see BUGS AND NOTES below. Implies -s
-DPrint the date of the last modification time or if -c is used, the last status change time for the file listed
-FAppends '/', '=', '*', '@', '|' or '>' as per ls -F
--inodesPrint inode number of each file
--devicePrint device ID number to which each file belongs
-vSort files alphanumerically by version
-tSort files by last modification time
-cSort files by last status change time
-ULeave files unsorted
-rReverse the order of the sort
--dirsfirstList directories before files (-U disables)
--sort <type>Select sort
-iDon't print indentation lines
-APrint ANSI lines graphic indentation lines
-SPrint with CP437 (console) graphics indentation lines
-nTurn colorization off always (-C overrides)
-CTurn colorization on always
-XPrints out an XML representation of the tree
-JPrints out an JSON representation of the tree
-H <baseHREF>Prints out HTML format with baseHREF as top directory
-T <title>Replace the default HTML title and H1 header with string
--nolinksTurn off hyperlinks in HTML output
--fromfileReads paths from files
--versionPrint version and exit
--helpPrint usage and this help message and exit
--Options processing terminator