mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-29 23:24:55 +02:00
tree: ignore specific directories (#3837)
This commit is contained in:
parent
26e019b295
commit
c5844c469b
2 changed files with 16 additions and 8 deletions
|
@ -2,15 +2,15 @@
|
||||||
|
|
||||||
> Show the contents of the current directory as a 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):
|
- Print files and directories up to 'num' levels of depth (where 1 means the current directory):
|
||||||
|
|
||||||
`tree -L {{num}}`
|
`tree -L {{num}}`
|
||||||
|
|
||||||
- Show directories only:
|
- Print directories only:
|
||||||
|
|
||||||
`tree -d`
|
`tree -d`
|
||||||
|
|
||||||
- Show hidden files too:
|
- Print hidden files too:
|
||||||
|
|
||||||
`tree -a`
|
`tree -a`
|
||||||
|
|
||||||
|
@ -29,3 +29,7 @@
|
||||||
- Ignore entries that match a wildcard (glob) pattern:
|
- Ignore entries that match a wildcard (glob) pattern:
|
||||||
|
|
||||||
`tree -I {{*.txt}}`
|
`tree -I {{*.txt}}`
|
||||||
|
|
||||||
|
- Print the tree ignoring the given directories:
|
||||||
|
|
||||||
|
`tree -I '{{directory_name1|directory_name2}}'`
|
||||||
|
|
|
@ -2,15 +2,15 @@
|
||||||
|
|
||||||
> Show the contents of the current directory as a 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):
|
- Print files and directories up to 'num' levels of depth (where 1 means the current directory):
|
||||||
|
|
||||||
`tree -L {{num}}`
|
`tree -L {{num}}`
|
||||||
|
|
||||||
- Show directories only:
|
- Print directories only:
|
||||||
|
|
||||||
`tree -d`
|
`tree -d`
|
||||||
|
|
||||||
- Show hidden files too:
|
- Print hidden files too:
|
||||||
|
|
||||||
`tree -a`
|
`tree -a`
|
||||||
|
|
||||||
|
@ -22,10 +22,14 @@
|
||||||
|
|
||||||
`tree -s -h --du`
|
`tree -s -h --du`
|
||||||
|
|
||||||
- Find files within the tree hierarchy, using a wildcard (glob) pattern, and pruning out directories that don't contain matching files:
|
- Print files within the tree hierarchy, using a wildcard (glob) pattern, and pruning out directories that don't contain matching files:
|
||||||
|
|
||||||
`tree -P '{{*.txt}}' --prune`
|
`tree -P '{{*.txt}}' --prune`
|
||||||
|
|
||||||
- Find directories within the tree hierarchy, pruning out directories that aren't ancestors of the wanted one:
|
- Print directories within the tree hierarchy, using the wildcard (glob) pattern, and pruning out directories that aren't ancestors of the wanted one:
|
||||||
|
|
||||||
`tree -P {{directory_name}} --matchdirs --prune`
|
`tree -P {{directory_name}} --matchdirs --prune`
|
||||||
|
|
||||||
|
- Print the tree ignoring the given directories:
|
||||||
|
|
||||||
|
`tree -I '{{directory_name1|directory_name2}}'`
|
||||||
|
|
Loading…
Add table
Reference in a new issue