O'Reilly logo

Java 9 Cookbook by Nick Samoylov, Mohamed Sanaulla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Getting ready

Generally, the tree command doesn't come preinstalled. So, you will have to install the package that contains the command. To install on an Ubuntu/Debian-based system, run the following command:

sudo apt-get install tree

To install on Linux, which supports the yum package manager, run the following command:

yum install tree

To verify your installation, just run the tree command, and you should be able to see the current directory structure printed. For me, it's something like this:

There are multiple options supported by the tree command. It's for you to explore. 

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required