tree: add -C, --du and --prune examples (#4332)

beep
Axel Navarro 2020-09-17 08:49:09 -03:00 committed by GitHub
parent 50a4126485
commit cc3c949509
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 8 deletions

View File

@ -1,6 +1,7 @@
# tree # tree
> Show the contents of the current directory as a tree. > Show the contents of the current directory as a tree.
> More information: <http://mama.indstate.edu/users/ice/tree/>.
- Print 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):
@ -10,25 +11,25 @@
`tree -d` `tree -d`
- Print hidden files too: - Print hidden files too with colorization on:
`tree -a` `tree -a -C`
- Print the tree without indentation lines, showing the full path instead (use `-N` to not escape whitespace and special characters): - Print the tree without indentation lines, showing the full path instead (use `-N` to not escape whitespace and special characters):
`tree -i -f` `tree -i -f`
- Print the size of each node next to it, in human-readable format: - Print the size of each file and the cumulative size of each directory, in human-readable format:
`tree -s -h` `tree -s -h --du`
- Filter the tree using a wildcard (glob) pattern: - Print files within the tree hierarchy, using a wildcard (glob) pattern, and pruning out directories that don't contain matching files:
`tree -P {{*.txt}}` `tree -P '{{*.txt}}' --prune`
- Ignore entries that match a wildcard (glob) pattern: - Print directories within the tree hierarchy, using the wildcard (glob) pattern, and pruning out directories that aren't ancestors of the wanted one:
`tree -I {{*.txt}}` `tree -P {{directory_name}} --matchdirs --prune`
- Print the tree ignoring the given directories: - Print the tree ignoring the given directories: