What should I do if the tree command cannot be used under Linux?

Generally, when you encounter this problem, various experts will tell you that it is because it is not installed.

$ tree
-bash: tree: command not found

like this
Indeed, there is no such command. If I haven’t installed it yet, I really need to install it. Hahahahahahahahahahahahahaha!
But why can't we use it? Is it because I can't install it? Not really!
There are really a lot of online tutorials, but unfortunately, I failed to live up to the good intentions of the masters!
family! Let’s just say it! I can't pretend! Purely because!

Mo! have to! right! limit! "I mean the server, I mean a newbie like me"

What 's the matter?yum install tree -y We can't use it! But it’s so fun and so useful!apt-get install tree

tree

treewhat is it then?

The tree command is used to list the contents of a directory in a tree view.
Execute the tree command, which will list all files in the specified directory, including files in subdirectories.

It can look like this!
The tree command is used to list directory contents in a tree diagram
How comfortable!
What do I want to do too!

Hey hey hey, if you keep thinking about it, there will be a response!
This doesn't allow me to find a good solution!
Dang Dang Dang Dang~~~~~

find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g' # tree的平替

Isn’t it very nice!
Bingo!
How handsome!

Wish me to get rid of vegetables soon!

Guess you like

Origin blog.csdn.net/weixin_43843918/article/details/124610831