tree: ignore specific directories (#3837)

client-spec/clarity
Pavel Shtanko 2020-02-09 00:08:19 +01:00 committed by GitHub
parent 26e019b295
commit c5844c469b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 8 deletions

View File

@ -2,15 +2,15 @@
> 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}}`
- Show directories only:
- Print directories only:
`tree -d`
- Show hidden files too:
- Print hidden files too:
`tree -a`
@ -29,3 +29,7 @@
- Ignore entries that match a wildcard (glob) pattern:
`tree -I {{*.txt}}`
- Print the tree ignoring the given directories:
`tree -I '{{directory_name1|directory_name2}}'`

View File

@ -2,15 +2,15 @@
> 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}}`
- Show directories only:
- Print directories only:
`tree -d`
- Show hidden files too:
- Print hidden files too:
`tree -a`
@ -22,10 +22,14 @@
`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`
- 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`
- Print the tree ignoring the given directories:
`tree -I '{{directory_name1|directory_name2}}'`