View and Display Linux Fedora Directory Tree using tree Command

View Fedora Linux Directory
Tree Using tree command

The directory in
Linux Fedora can be view by tree like format using the tree command.
The example below show the use of tree command to display Linux
Fedora directory in tree like format, the example below also show
the use of tree command to display directory inode number and files
inode number on Linux Fedora system.

tree command example:

1. The
command below, use tree command to display and list only one level
directory from the root directory:

[root@fedora ~]#
tree
-L 1 //

|-- bin

|-- boot

|-- dev

|-- etc

|-- home

|-- lib

|-- lost+found

|-- media

|-- misc

|-- mnt

|-- net

|-- opt

|-- proc

|-- root

|-- samba-share

|-- sbin

|-- selinux

|-- srv

|-- sys

|-- tmp

|-- usr

`-- var

22 directories, 0 files

[root@fedora ~]#

2. The example
below use the tree command to display and view the directory and
directory inodes number in Linux Fedora.

[root@fedora ~]# tree -L 1 --inodes
/

/

|-- [ 310689] bin

|-- [ 2] boot

|-- [ 219] dev

|-- [ 384273] etc

|-- [ 425153] home

|-- [ 16353] lib

|-- [ 11]
lost+found

|-- [ 179873] media

|-- [ 318865] mnt

|-- [ 515089] opt

|-- [ 1] proc

|-- [ 343393] root

|-- [ 24530] sbin

|-- [ 1] selinux

|-- [ 392449] srv

|-- [ 1] sys

|-- [ 261633] tmp

|-- [ 204401] usr

`-- [ 408801] var

19 directories, 0
files

[root@fedora ~]#

3. Display second level directory tree from the root
directory, and pipe the output to less command

[root@fedora ~]# tree -L
2 / | less /

|-- bin

| |-- alsacard

| |-- alsaunmute

| |-- arch

| |-- awk -> gawk

| |-- basename

| |-- bash

| |-- cat

| |-- chgrp

| |-- chmod

| |-- chown

| |-- cp

++++++++++++++

408 directories, 950 files

[root@fedora ~]#

4. List all directory and
files under the specific directory, the example below show the use
of tree command
to display all directory file in current
directory including hidden files and hidden directory

1 comment

I really wanted to develop a small remark to say thanks to www.labtestproject.com for some of the amazing recommendations you are writing at this website. My considerable internet look up has at the end been recognized with brilliant suggestions to exchange with my guests. I would assert that we site visitors actually are quite lucky to exist in a wonderful community with so many outstanding people with very beneficial principles. I feel very much fortunate to have used your entire webpage and look forward to many more brilliant times reading here. Thanks once again for all the details.