Linux Command Learning Note: Tree command

Source: Internet
Author: User

[Email protected]:~The Tree Program "tree" is not yet installed. You can use the following command to install:sudoApt-getInstallTree[email protected]:~$sudoApt-getInstalltreetree--Displays the disk directory structure Command function: Displays all directory paths on the specified drive and all file names under these directories. 1. Tree---all content in the current directory is displayed [plain] view Plaincopy[email protected]-desktop:/usr$ Tree2. Tree-l Level---displays only the directory structure of the specified maximum depth in the current directory [plain] view Plaincopy[email protected]-desktop:/usr$ tree-l1  . ├──BIN├──GAMES├──INCLUDE├──LIB├──LIB32├──LOCAL├──SBIN├──SHARE└──SRC9Directories,0files [email protected]-desktop:/usr$3.-d Displays the directory name rather than the content. [Plain] View Plaincopy[email protected]-desktop:~/virtualbox vms$ Tree-d. ├──win7│└──logs├──winxp│├──logs│└──snapshots└──xp2└──logs7directories [email protected]-desktop:~/VirtualBox vms$4.-F Displays the full relative path name before each file or directory. [Plain] View Plaincopy[email protected]-desktop:~/virtualbox vms$ Tree-F. ├──./win7│├──./win7/logs││├──./win7/logs/vbox.log││├──./win7/logs/vbox.log.1││├──./win7/logs/vbox.log.2││└──./win7/logs/vbox.log.3│├──./win7/win7.vbox│└──./win7/win7.vbox-prev├──./winxp│├──./winxp/logs││├──./winxp/logs/vbox.log││├──./winxp/logs/vbox.log.1││├──./winxp/logs/vbox.log.2││└──./winxp/logs/vbox.log.3│├──./winxp/snapshots│├──./winxp/winxp.vbox│├──./winxp/winxp.vbox-prev│└──./winxp/winxp.vdi└──./xp2├──./xp2/logs│├──./xp2/logs/vbox.log│├──./xp2/logs/vbox.log.1│├──./xp2/logs/vbox.log.2│└──./xp2/logs/vbox.log.3├──./xp2/xp2.vbox├──./xp2/xp2.vbox-prev└──./xp2/Xp2.vdi7Directories, -files [email protected]-desktop:~/VirtualBox vms$5.-T is sorted with the change time of the file and directory. [Plain] View Plaincopy[email protected]-desktop:~/virtualbox vms$ Tree-T. ├──winxp│├──winxp.vdi│├──logs││├──vbox.log││├──vbox.log.1││├──vbox.log.2││└──vbox.log.3│├──winxp.vbox│├──winxp.vbox-Prev│└──snapshots├──xp2│├──xp2.vbox│├──xp2.vbox-Prev│├──xp2.vdi│└──logs│├──vbox.log│├──vbox.log.1│├──vbox.log.2│└──vbox.log.3└──win7├──win7.vbox├──win7.vbox-Prev└──logs├──vbox.log├──vbox.log.1├──vbox.log.2└──vbox.log.3    7Directories, -files [email protected]-desktop:~/virtualbox vms$

Linux Command Learning Note: Tree command

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.