DEV Community 👩‍💻👨‍💻

karenpanahi
karenpanahi

Posted on

Tree command linux

really simple tut to get you going with tree command

tag meanings :

tree -a :all 
tree -f :list wit fullpath prefix
tree -d :directories 
tree -df :dirs with fullpath prefix !
# this is the depth the tree goes in(2 means 2 directories) 
tree -L <desired lenght> >>>tree -L  2 
-u: the username
-g: the groupname 
-p:permissions 
-s :size
-h: for showing the size with K ,M ,T
tree -L 3 -pug

Enter fullscreen mode Exit fullscreen mode

wild card

wildcard command would be -P (pattern) :

tree -f -P cata* 
$prune the empty dirs:
tree -f --prune 
$print with permissions 
tree -f -p 
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

🌚 Friends don't let friends browse without dark mode.

Sorry, it's true.