Loading AI tools
Shell command in various operating systems From Wikipedia, the free encyclopedia
In computing, tree
is a recursive directory listing command or program that produces a depth-indented listing of files. Originating in PC- and MS-DOS, it is found in Digital Research FlexOS,[1] IBM/Toshiba 4690 OS,[2] PTS-DOS,[3] FreeDOS,[4] IBM OS/2,[5] Microsoft Windows,[6] and ReactOS. A version for Unix and Unix-like systems is also available.
![]() The ReactOS tree command | |
Developer(s) | Steve Baker, DR, Microsoft, IBM, Itautec, Datalight, Toshiba, Dave Dunfield, Asif Bahrainwala |
---|---|
Written in | Unix-like, FreeDOS, ReactOS: C |
Operating system | Unix, Unix-like, MS-DOS, PC DOS, FlexOS, SISNE plus, ROM-DOS, 4690 OS, PTS-DOS, OS/2, eComStation, ArcaOS, Windows, DR DOS, FreeDOS, ReactOS |
Platform | Cross-platform |
Type | Command |
License | Unix, Unix-like, FreeDOS, ReactOS: GPLv2 |
The tree
command is frequently used as part of a technical support scam, where the command is used to occupy the command prompt screen, while the scammer, pretending to be technical support, types additional text that is supposed to look like output of the command.[7]
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.[8]
The command is available in MS-DOS versions 3.2 and later and IBM PC DOS releases 2 and later.[9] Digital Research DR DOS 6.0,[10] Itautec SISNE plus,[11] and Datalight ROM-DOS[12] include an implementation of the tree
command.
The Tree Command for Linux was developed by Steve Baker.[13] The FreeDOS version was developed by Dave Dunfield[14] and the ReactOS version was developed by Asif Bahrainwala.[15] All three implementations are licensed under the GNU General Public License.
The Tree command is also available in macOS as a formula installed via the command line Homebrew package manager.[16]
$ tree path/to/folder/
path/to/folder/
├── a-first.html
├── b-second.html
├── subfolder
│ ├── readme.html
│ ├── code.cpp
│ └── code.h
└── z-last-file.html
1 directories, 6 files
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.