DEV Community

loading...

TIL about tree

Monica
I still answer "developer". Italian living in Germany. proud MC of Euruko [2016], Ruby on Ice [2017, 2018], BalkanRuby [2017], Italian Ruby Day [2016, 2018].
Updated on ・1 min read

This is a walk-with-me-while-I-do-things series, I'm going to tell you what I learned while I'm learning

Yesterday I purchased Rebuilding Git by James Coglan and today I set up for Chapter 1. I already learned something new on page 4 📖

tree is a command originated in MS-DOS (apparently) that has been ported to *nix systems.
By running it in the terminal, it draws for you a graphical recursive representation of the content of the current folder and its children (files and directories), and prints the number of files and/or directories listed.

It might not come with your OS, it is a program on its own. If you are on a Mac and using homebrew like me, just type

brew install tree

More info here and here

Discussion (2)

Collapse
olistik profile image
olistik

originated in MS-DOS (apparently) that has been ported to *nix systems.

This alone is something I wasn't expecting at all.

tree is a pretty good command I look for every now and then. 🙂

Collapse
nirnaeth profile image
Monica Author

if I knew about it before, I would have saved so much time. it's pretty neat.