DEV Community

Monica
Monica

Posted on • Updated on

TIL about tree

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

Latest comments (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

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