Equivalent to command prompt's "tree" command? [duplicate]

Back in my (sucky) Windows days, I used the tree command to view the file hierarchy in a pretty display. I am aware of the find command, but to actually process any data in my clogged 241,416 folders/files from just checking each line is as possible as time travelling...

./build/CMakeFiles/cmake.check_cache
./build/CMakeFiles/Makefile.cmake
./build/CMakeFiles/CMakeTmp
./build/CMakeFiles/TargetDirectories.txt
./build/CMakeFiles/compilerid.dir
./build/CMakeFiles/
./build/CMakeFiles/
./build/CMakeFiles/
./build/CMakeFiles/
./build/CMakeFiles/
./build/CMakeFiles/
./build/CMakeFiles/
./build/CMakeFiles/
./build/CMakeFiles/
./build/CMakeFiles/
./build/cmake_install.cmake
./build/CMakeCache.txt
./build/Makefile
./build/compilerid
./CompilerID.kdev4
./.kdev4
./.kdev4/CompilerID.kdev4
./main.cpp

Output of find on one folder holding the files of a one-file, incomplete C++ project

On Windows, the tree command gave a diagram-like output that is human readable

Screenshot of tree command in command promptScreenshot of the pretty tree command

So, my question is, is there anything graphically close to the Windows/DOS tree command?

3

2 Answers

Same command exist. To install, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get install tree

enter image description here

7

You have tree command in linux. All you have to do is install it. It works very similar to the one in windows.

sudo apt-get install tree

You Might Also Like