1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-03 21:55:46 +02:00

split tree.md into linux and osx versions, to cater to the different sets of available options

This commit is contained in:
Waldir Pimenta 2016-08-24 17:09:58 +01:00
parent 268af0f8a9
commit 31a07858ca
2 changed files with 32 additions and 1 deletions

27
pages/linux/tree.md Normal file
View file

@ -0,0 +1,27 @@
# tree
> Show the contents of the current directory as a tree.
- Show files and directories up to 'num' levels of depth (where 1 means the current directory):
`tree -L {{num}}`
- Show directories only:
`tree -d`
- Show hidden files too:
`tree -a`
- Print the tree without indentation lines, showing the full path instead:
`tree -i -f`
- Print the size of each node next to it, in human-readable format:
`tree -s -h`
- Filter the tree using a wildcard (glob) pattern:
`tree -P {{*.txt}}`

View file

@ -22,6 +22,10 @@
`tree -s -h --du`
- Filter the tree using a wildcard (glob) pattern, showing only the hierarchies leading to the matching entries:
- Find files within the tree hierarchy, using a wildcard (glob) pattern, and pruning out directories that don't contain matching files:
`tree -P {{*.txt}} --prune`
- Find directories within the tree hierarchy, pruning out directories that aren't ancestors of the wanted one:
`tree -P {{directory_name}} --matchdirs --prune`