In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail about the use of linux tree command to list directory contents in a tree diagram, Xiaobian think it is quite practical, so share it with you as a reference, I hope you can gain something after reading this article.
The full name of the tree command is "tree", which is used to list the contents of a directory in tree form. Executes the tree command, which lists all files in the specified directory in a tree diagram, including files in the directory, showing the file directory structure of the specified directory.
Syntax format: tree [parameter]
Common parameters:
-a Display all files and directories-A Use ASNI drawing characters to display tree diagrams instead of ASCII character combinations-C Color file and directory listings to distinguish between types-d Display directory names instead of contents-D List file or directory change times-f Display complete relative path names before each file or directory-F Execute file, directory, Socket, symbolic link, pipe name names, each with "*,""/,""=,"@,"|"No. -g Lists the group name of the file or directory. If there is no corresponding name, the group identifier is displayed. -i Do not list the file or directory name in a ladder. -I Do not realistically match the file or directory name of the template style. -l If you encounter a directory with the nature of a symbolic link, directly list the original directory to which the link points. -n Do not add color to the file and directory list. -N Directly list the file and directory names. Include control characters-p List permission designators-p Show only file or directory names that match template like yes-q Use "? "sign replaces control characters, lists file and directory names-s lists file or directory sizes-t sorts by file and directory change time-u lists file or directory owner names, displays user ID if no corresponding name-x limits scope to current file system, if certain subdirectories under specified directory are stored on another file system, excludes them from scope-L level display
Reference Example
Display only n-level directories (n is a number):
[root@linuxcool ~]# tree -L 2
Sorted by file and directory change time:
[root@linuxcool ~]# tree -t
Sort in reverse order:
[root@linuxcool ~]# tree -r
Before each file or directory, the complete relative path is displayed:
[root@linuxcool ~]# tree -f
Show only directories:
[root@linuxcool ~]# tree -d
Show all files and directories:
[root@linuxcool ~]# tree -a About using linux tree command to list directory contents in tree diagram to share here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.