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 MS-DOS, FlexOS[1], FreeDOS[2], OS/2, Microsoft Windows[3], and ReactOS.

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.[4]

The Tree Unix utility was developed by Steve Baker.[5]

Example

$ 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

References

  1. http://www.bitsavers.org/pdf/digitalResearch/flexos/1073-2003_FlexOS_Users_Guide_V1.3_Nov86.pdf
  2. http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/group-base.html
  3. https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-xp/bb491019(v%3dtechnet.10)
  4. "tree(1) - Linux man page". Linux man pages. Retrieved February 22, 2017.
  5. Steve Baker. "The Tree Command for Linux Homepage". Center for Biological Computing, Indiana State University Department of Life Sciences.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.