Linux tree Command and Linuxtree command
Tree commands in Linux
-- View the directory tree in Linux
Sometimes we need to generate a directory tree structure, which can be ls-R, but the actual effect is not good.
Tree Command is required, but most Linux systems do not install the command by default. You need to install the command yourself. Common usage of tree:
Tree-a # Show All
Tree-d # show only Directories
Tree-L n # n indicates the number... indicates the number of layers to be displayed...
Tree-f # Show the complete path ..
What can I do if I cannot find the tree Command in linux?
Shendu @ shenlan :~ $ Tree
The program "tree" has not been installed. You can use the following command to install:
Sudo apt-get install tree
Shendu @ shenlan :~ $ Sudo apt-get install tree
Reading the package list... complete
Analyzing the dependency tree of the software package
Reading status information... complete
The following [new] software packages will be installed:
Tree
0 software packages are upgraded, 1 new software package is installed, 0 software packages are to be uninstalled, and 0 software packages are not upgraded.
Download the 31.1kB software package.
After decompression, extra space of 98.3kB is consumed.
Obtain: 1 cn.archive.ubuntu.com/ubuntu/ lucid/universe tree 1.5.3-1 [31.1kB]
Download 31.1kB, which takes 0 seconds (87.0kB/s)
The software package tree that has been deselected is selected.
(Reading the database... the system currently has a total of 166619 files and directories installed .)
The tree command displays the directory tree in the current folder!
Linux has the same command as the tree Command in WINDOWS.
Is the tree. If you are prompted to install the package without this command
Yum install tree
The current version is 1.5.0-4.