tree (command)

In computing, tree is a recursive directory listing command or program that produces a depth-indented listing of files. It is available in Unix and Unix-like systems, as well as DOS, Digital Research FlexOS,[1] IBM/Toshiba 4690 OS,[2] PTS-DOS,[3] FreeDOS,[4] IBM OS/2,[5] Microsoft Windows,[6] and ReactOS.

Developer(s)Steve Baker, Digital Research, Microsoft, IBM, Toshiba, Dave Dunfield, Asif Bahrainwala
Operating systemUnix, Unix-like, MS-DOS, PC DOS, FlexOS, 4690 OS, PTS-DOS, OS/2, Windows, DR DOS, FreeDOS, ReactOS
LicenseUnix, Unix-like, FreeDOS, ReactOS: GPL


With no arguments, tree lists the files in the current directory. When directory arguments are given, tree lists all the files or directories found in the given directories each in turn. Upon completion of listing all files and directories found, tree returns the total number of files and directories listed. There are options to change the characters used in the output, and to use color output.[7]

The command is available in MS-DOS versions 3.2 and later and IBM PC DOS releases 2 and later.[8] DR DOS 6.0 includes an implementation of the tree command.[9]

The Tree Unix utility was developed by Steve Baker.[10] The FreeDOS version was developed by Dave Dunfield[11] and the ReactOS version was developed by Asif Bahrainwala.[12] All three implementations are licensed under the GPL.


$ tree path/to/folder/
├── a-first.html
├── b-second.txt
├── subfolder
│   ├── readme.txt
│   ├── code.cpp
│   └── code.h
└── z-last-file.txt

1 directories, 6 files

See also


Further reading

  • Cooper, Jim (2001). Special Edition Using MS-DOS 6.22, Third Edition. Que Publishing. ISBN 978-0789725738.
  • Kathy Ivens; Brian Proffit (1993). OS/2 Inside & Out. Osborne McGraw-Hill. ISBN 978-0078818714.
  • John Paul Mueller (2007). Windows Administration at the Command Line for Windows Vista, Windows 2003, Windows XP, and Windows 2000. John Wiley & Sons. ISBN 978-0470165799.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.