©2018 by Zach Pfeffer

SEARCH THIS SITE

Create a Tree-View of a Directory on Linux with 'tree'

August 17, 2019

 This post shows you how to create a tree-view of a directory on Linux (Ubuntu).

 

Install and Use Tree

 

To create a tree view of a directory install tree by running sudo apt install tree

 

Type tree in the directory you'd like to list:

 

Type tree -d to just get directories:

 

 

Create this Directory

 

The demo tree structure was created using these commands:

mkdir ~/treedemo
cd ~/treedemo/
mkdir dir1
mkdir dir2
mkdir dir3
cd dir1
touch file1.txt
touch file2.txt
touch file3.txt
cd ../dir2
touch file4.txt

 

 

Type rm -rf ~/treedemo to remove the treedemo directory.

 

 

Reference

 

GNU image from [link]

 

 

Please reload

Our Recent Posts

Business Classifications from Sandia National Laboratories

March 24, 2020

"Guidance for Completing the Company Commercialization Metrics Survey" from NASA 2020 SBIR/STTR

March 21, 2020

Army 20.1 SBIR TABA Funding Clarification: is $5k "On Top" of the $167,500 Available?

February 18, 2020

1/1
Please reload

Tags

Please reload