Viewing directories using the tree command

Not all Linux systems have the tree command installed, but it is in the Linux system/image set up for this introduction.

Transcript

[hes@vm18-165 ~]$ tree

You should see the directory tree displayed as follows:

[hes@vm18-165 ~]$ tree
.
|-- a
|-- b
|-- c
|   |-- w
|   |-- y
|       |-- z
|-- first-cat
|-- first-file

2 directories, 6 files

Transcript

[hes@vm18-165 ~]$ tree /home

You should see the directory tree starting with /home displayed as follows:

[hes@vm18-165 ~]$ tree /home
/home
|-- hes
|   |-- a
|   |-- b
|   |-- c
|   |   |-- w
|   |   |-- y
|   |       |-- z
|   |-- first-cat
|   |-- first-file
|-- mtr
    |-- onlyonefile

4 directories, 7 files
If there are other directories in /home besides yours, they are owned by other users, so mtr is another user.

Return to Glide


Copyright 2019,2020 by Henry E. Schaffer. Comments and suggestions are welcome, and should go to hes@ncsu.edu
Licensed under the Creative Commons Attribution-NonCommercial 4.0 International Public License https://creativecommons.org/licenses/by-nc/4.0/legalcode
Last updated 1/9/2020