Section: User Commands (1)
tree [acdfghilnpqrstuvxACDFQNSUX] [-L level [-R]] [-H baseHREF] [-T title] [-o filename] [--nolinks] [-P pattern] [-I pattern] [--inodes] [--device] [--noreport] [--dirsfirst] [--version] [--help] [--filelimit #] [--si] [--prune] [--du] [--timefmt format] [--matchdirs] [-] [directory ...]
Tree is a recursive directory listing program that produces a depth indented listing of files, which is colorized ala dircolors if the LS_COLORS environment variable is set and output is to tty. With no arguments, tree lists the files in the current directory. When directory arguments are given, tree lists all the files and/or directories found in the given directories each in turn. Upon completion of listing all files/directories found, tree returns the total number of files and/or directories listed.
By default, when a symbolic link is encountered, the path that the symbolic link refers to is printed after the name of the link in the format:
name -> real-path
If the `-l' option is given and the symbolic link refers to an actual directory, then tree will follow the path of the symbolic link as if it were a real directory.
Tree understands the following command line switches:
.TP --ignore-case If a match pattern is specified by the -P or -I option, this will cause the pattern to match without regards to the case of each letter.
System color database. ~/.dircolors
Users color database.
Color information created by dircolors TREE_COLORS
Uses this for color information over LS_COLORS if it is set. TREE_CHARSET
Character set for tree to use in HTML mode. LC_CTYPE
Locale for filename output. LC_TIME
Locale for timefmt output, see strftime?(3). TZ
Timezone for timefmt output, see strftime?(3).
Steve Baker ([email protected])
HTML output hacked by Francesc Rocher ([email protected])
Charsets and OS/2 support by Kyosuke Tokoro ([email protected])
Tree does not prune "empty" directories when the -P and -I options are used by default. Use the --prune option.
The -h and --si options round to the nearest whole number unlike the ls implementations which rounds up always.
Pruning files and directories with the -I, -P and --filelimit options will lead to incorrect file/directory count reports.
The --prune and --du options cause tree to accumulate the entire tree in memory before emitting it. For large directory trees this can cause a significant delay in output and the use of large amounts of memory.
The timefmt expansion buffer is limited to a ridiculously large 255 characters. Output of time strings longer than this will be undefined, but are guaranteed to not exceed 255 characters.
XML/JSON trees are not colored, which is a bit of a shame.
Tutoriais de Tecnologia Web