On Linux, “tree” command is a very helpful command to display files and subdirectories in a directory, but doesn’t exist on my CentOS 7.1 machine ?

[root@centos7 ~]# tree
-bash: tree: command not found

So, just install it :

[root@centos7 ~]# yum -y install tree

It works, for example :

[root@centos7 ~]# tree /etc/systemd/system/basic.target.wants
/etc/systemd/system/basic.target.wants
├── firewalld.service -> /usr/lib/systemd/system/firewalld.service
└── microcode.service -> /usr/lib/systemd/system/microcode.service

0 directories, 2 files

 

PDF24    Send article as PDF   

Leave a Reply

Your email address will not be published. Required fields are marked *


*