1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/linux/tree.md

32 lines
636 B
Markdown
Raw Normal View History

2014-04-14 19:56:07 +02:00
# 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):
2014-04-14 19:56:07 +02:00
`tree -L {{num}}`
- Show directories only:
2014-04-14 19:56:07 +02:00
`tree -d`
- Show hidden files too:
2014-04-14 19:56:07 +02:00
`tree -a`
- Print the tree without indentation lines, showing the full path instead (use `-N` to not escape whitespace and special characters):
2014-04-14 19:56:07 +02:00
`tree -i -f`
2015-12-28 23:13:19 -05:00
- Print the size of each node next to it, in human-readable format:
2015-12-28 23:13:19 -05:00
`tree -s -h`
2015-12-28 23:13:19 -05:00
- Filter the tree using a wildcard (glob) pattern:
2015-12-28 23:13:19 -05:00
`tree -P {{*.txt}}`
- Ignore entries that match a wildcard (glob) pattern:
`tree -I {{*.txt}}`