mirror of https://github.com/CrimsonTome/tldr.git
tree: add -C, --du and --prune examples (#4332)
parent
50a4126485
commit
cc3c949509
|
@ -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:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue