tree (command)

From Wikipedia, the free encyclopedia
  (Redirected from Tree (Unix))
Jump to navigation Jump to search

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

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.

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]

Overview[edit]

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] and Datalight ROM-DOS[11] include an implementation of the tree command.

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

Example[edit]

$ tree path/to/folder/
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[edit]

References[edit]

  1. ^ http://www.bitsavers.org/pdf/digitalResearch/flexos/1073-2003_FlexOS_Users_Guide_V1.3_Nov86.pdf
  2. ^ https://archive.org/details/4690OSV6r2UsersGuide/page/n169
  3. ^ "PTS-DOS 2000 Pro User Manual" (PDF). Buggingen, Germany: Paragon Technology GmbH. 1999. Archived (PDF) from the original on 2018-05-12. Retrieved 2018-05-12.
  4. ^ http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/group-base.html
  5. ^ http://www.jatomes.com/Help/Os2Cmd.php#TREE
  6. ^ https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-xp/bb491019(v%3dtechnet.10)
  7. ^ "The World of the Technical Support Scam". The State of Security. 2016-11-09. Retrieved 2019-12-29.
  8. ^ "tree(1) - Linux man page". Linux man pages. Retrieved February 22, 2017.
  9. ^ Wolverton, Van (2003). Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition. Microsoft Press. ISBN 0-7356-1812-7.
  10. ^ DR DOS 6.0 User Guide Optimisation and Configuration Tips
  11. ^ "Datalight ROM-DOS User's Guide" (PDF). www.datalight.com.
  12. ^ Steve Baker. "The Tree Command for Linux Homepage". Center for Biological Computing, Indiana State University Department of Life Sciences.
  13. ^ http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/tree.html
  14. ^ https://github.com/reactos/reactos/blob/master/base/applications/cmdutils/tree/tree.c

Further reading[edit]

External links[edit]