DTREE(1) BSD General Commands Manual DTREE(1)
dtree -- Command line program to draw trees
dtree [-s set] [file]
dtree is a simple command line program which reads a number of lines and
formats them as a tree using line drawing characters in several sets.
Each input line represents one node in a tree. The number of tabs at the
start of each input line determines the nesting level of that node. It
is intended for the root node to have no tabs at the start.
If the file is omitted, dtree will read from stdin. Any additional argu-
ments after file will be ignored.
Command line options
dtree -h Prints usage information.
dtree -s set
Selects the symbol set set. Allowed values for set are:
a (ASCII set), d (double-stroke set), and s (sin-
gle-stroke set, default).
dtree -v Prints version and commit date.
Format a tree using double-stroke box drawing characters:
printf "A\n\tB\n\t\tC\n\tD\n" | dtree -sd
find . -print | sed -E "s,[^/]+/,$(printf '\t'),g" | dtree
same, using ASCII characters:
find . -print | sed -E "s,[^/]+/,$(printf '\t'),g" | dtree -sa
Strahinya Radich <firstname.lastname@example.org>, 2023
BSD October 02, 2023 BSD