Tuesday 14 February 2017

How to display tree of directories and files on Ubuntu


Besides displaying tree of processes on ubuntu, you can also display tree of directories and files if you like. To display tree of process the command is 'pstree', but for directories and files the command is just 'tree'.

The 'pstree' command is comes pre-installed on ubuntu, while the 'tree' command is not, so in order to use 'tree' command you need to install it first.

Installing the 'tree' command:
sudo apt-get install tree

Go ahead run the 'tree' command:
tree
The 'tree' command have several parameters that you can use, such as -d for showing directory only, and there is -f for showing full path, and so on.
tree -d
tree -f
For other parameters, you can have a look at the manual page for 'tree' command, simply run 'man tree' on the command line.

Harry

Author & Editor

A technology enthusiast and addictive blogger who likes to hacking tricks and wish to be the best White Hacket Hacker of the World.

0 comments:

Post a Comment

Note: only a member of this blog may post a comment.