LinuxCommandLibrary

tre

Show the contents of the current directory as a tree.

TLDR

Print directories only

$ tre --directories
copy


Print JSON containing files in the tree hierarchy instead of the normal tree diagram
$ tre --json
copy


Print files and directories up to the specified depth limit (where 1 means the current directory)
$ tre --limit [depth]
copy


Print all hidden files and directories using the specified colorization mode
$ tre --all --color [automatic|always|never]
copy


Print files within the tree hierarchy, assigning a shell alias to each file that, when called, will open the associated file using the provided command (or in $EDITOR by default)
$ tre --editor [command]
copy


Print files within the tree hierarchy, excluding all paths that match the provided regular expression
$ tre --exclude [regular_expression]
copy


Display version
$ tre --version
copy


Display help
$ tre --help
copy

Copied to clipboard