In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the linux tree command how to use, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.
Tree
If you want to see the tree structure of your files, tree is a good choice. It may not be installed by default on your system, you can use package Management DNF to install it manually:
$sudo dnf install tree
If you run tree without any options or parameters, it will start with the current directory and display a tree view of all the directories and files under it. As a reminder, this output can be very large because it contains all the directories and files in this directory:
$tree. |-- Documents | |-- notes.txt | |-- secret | | `--christmas-presents.txt |`-- work | |-- project-abc | | |-- README.md | | |-- do-things.sh | | `--project-notes.txt |`-- status-reports.txt |-- Music |-- Pictures | |-- trees.png | `--wallpaper.png |-- Videos`-- notes.txt.
If there are too many lists, use the-L option, followed by the number of levels you want to view, to limit the level of files listed:
$tree-L 2. |-- Documents | |-- notes.txt | |-- secret | `--work |-- Music |-- Pictures | |-- trees.png |`-- wallpaper.png |-- Videos`-- notes.txt
You can also display a tree view of a specified directory:
$tree Documents/work/Documents/work/ |-- project-abc | |-- README.md | |-- do-things.sh | `--project- notes.txt`-status-reports.txt
If you use tree to list a large tree view, you can combine it with less:
$tree | less
Once again, tree has a lot of other options available, and you can combine them to play a more powerful role. All of these options are available in the man man page:
$man tree
Thank you for reading this article carefully. I hope the article "how to use the tree Command of linux" shared by the editor will be helpful to everyone. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.