Tree (command)

Short description: Shell command in various operating systems

tree

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

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 `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]

## Contents

* 1 Overview
* 2 Example
* 3 See also
* 4 References
* 5 Further reading
* 6 External links

## Overview

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.

## Example

$ 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

## See also

* dir
* ls
* pstree
* List of Unix commands
* List of DOS commands

## References

1. ↑ FlexOS User's Guide (Version 1.3 ed.). Digital Research. November 1986. 1073-2003-001. http://www.bitsavers.org/pdf/digitalResearch/flexos/1073-2003_FlexOS_Users_Guide_V1.3_Nov86.pdf. Retrieved 2018-09-16.
2. ↑ https://archive.org/details/4690OSV6r2UsersGuide/page/n169 [|permanent dead link|dead link}}]
3. ↑ "PTS-DOS 2000 Pro User Manual". Buggingen, Germany: Paragon Technology GmbH. 1999. http://download.paragon-software.com/doc/manual_dos_eng.pdf.
4. ↑ "FreeDOS group -- FreeDOS Base". FreeDOS on ibiblio.org. http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/group-base.html.
5. ↑ "JaTomes Help - OS/2 Commands". http://www.jatomes.com/Help/Os2Cmd.php#TREE.
6. ↑ "Tree". 3 February 2023. https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/tree.
7. ↑ "The World of the Technical Support Scam" (in en-US). 2016-11-09. https://www.tripwire.com/state-of-security/featured/the-world-of-the-technical-support-scam/.
8. ↑ `tree(1)` – Linux User Commands Manual
9. ↑ Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition. Microsoft Press. 2003. ISBN 0-7356-1812-7.
10. ↑ DR DOS 6.0 User Guide Optimisation and Configuration Tips
11. ↑ Itautec (2015-05-14). "SISNE plus - Referência Sumária" (in pt). Datassette. https://datassette.org/manuais/ibm-pc/sisne-plus-referencia-sumaria. [1] (86 pages)
12. ↑ "Datalight ROM-DOS User's Guide". https://www.datalight.com/assets/files/ROM-DOS_Users_Guide.pdf.
13. ↑ Baker, Steve. "Home - Old Man Programmer". https://oldmanprogrammer.net/source.php?dir=projects/tree.
14. ↑ "FreeDOS Package -- Tree (FreeDOS Base)". FreeDOS on ibiblio.org. http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/tree.html.
15. ↑ on GitHub

## Further reading

* Special Edition Using MS-DOS 6.22, Third Edition. Que Publishing. 2001. 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.

## External links

* The Tree Command for Linux Homepage
* tree | Microsoft Docs

* v
* t
* e

Unix command-line interface programs and shell builtins

File system|

* cat
* chmod
* chown
* chgrp
* cksum
* cmp
* cp
* dd
* du
* df
* file
* fuser
* ln
* ls
* mkdir
* mv
* pax
* pwd
* rm
* rmdir
* split
* tee
* touch
* type
* umask

Processes|

* at
* bg
* crontab
* fg
* kill
* nice
* ps
* time

User environment|

* env
* exit
* logname
* mesg
* talk
* tput
* uname
* who
* write

Text processing|

* awk
* basename
* comm
* csplit
* cut
* diff
* dirname
* ed
* ex
* fold
* head
* iconv
* join
* m4
* more
* nl
* paste
* patch
* printf
* sed
* sort
* strings
* tail
* tr
* uniq
* vi
* wc
* xargs

Shell builtins|

* alias
* cd
* echo
* test
* unset
* wait

Searching|

* find
* grep

Documentation|

* man

Software development|

* ar
* ctags
* lex
* make
* nm
* strip
* yacc

Miscellaneous|

* bc
* cal
* expr
* lp
* od
* sleep
* true and false

* Categories
* Standard Unix programs
* Unix SUS2008 utilities
* List

* v
* t
* e

Windows command-line programs and shell builtins

* COMMAND.COM
* Command Prompt
* Windows PowerShell
* Recovery Console

File system navigation|

* cd (chdir)
* dir
* popd
* pushd
* tree

File management|

* attrib
* cacls
* cipher
* compact
* copy
* del (erase)
* deltree
* expand
* icacls
* makecab
* mkdir (md)
* mklink
* move
* recover
* ren (rename)
* replace
* rmdir (rd)
* robocopy
* tar
* xcopy

Disk management|

* chkdsk
* convert
* defrag
* diskcomp
* diskcopy
* diskpart
* drvspace
* fdisk
* format
* label
* manage-bde
* subst
* scandisk
* sys
* vol
* vssadmin

Processes|

* at
* exit
* kill
* powercfg
* runas
* sc
* schtasks
* shutdown
* start
* taskkill
* tasklist

Registry|

* assoc
* ftype
* reg
* regini
* regsvr32

User environment|

* date
* mode
* path
* set
* setx
* time
* title
* ver
* whoami

File contents|

* comp
* edit
* edlin
* fc
* find
* findstr
* print
* type

Scripting|

* choice
* clip
* cscript
* doskey
* echo
* for
* forfiles
* goto
* if
* more
* pause
* prompt
* rem
* timeout

Networking|

* arp
* BITSAdmin
* cURL
* getmac
* hostname
* ipconfig
* net
* netsh
* netstat
* nslookup
* PathPing
* ping
* route
* scp
* sftp
* ssh
* ssh-add
* ssh-agent
* ssh-keygen
* ssh-keyscan
* tracert
* winrm
* winrs

Maintenance and care|

* driverquery
* eventcreate
* eventtriggers
* msiexec
* ntbackup
* sfc
* systeminfo
* w32tm
* WBAdmin
* winsat
* wmic

Boot management|

* bcdedit
* bootcfg
* fixboot
* fixmbr

Software development|

* debug
* exe2bin
* QBasic

Miscellaneous|

* cls
* dism
* dpath
* gpupdate
* help
* MSCDEX
* pentnt
* wsl

* List of DOS commands
* Environment variables

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Tree (command). Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Software:Tree_(command)&oldid=951232"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template