CmdID

CmdID / Commands

tree

Displays the directory structure of a path or of the disk in a drive graphically. Windows commands reference

On Windows 2 Sigma rules name it

Opens CmdID with your command. It is read in your browser and sent nowhere.

Windows

from the Windows commands reference, CC BY 4.0

Displays the directory structure of a path or of the disk in a drive graphically. The structure displayed by this command depends upon the parameters that you specify at the command prompt. If you don't specify a drive or path, this command displays the tree structure beginning with the current directory of the current drive.

tree [<drive>:][<path>] [/f] [/a]

To display the names of all the subdirectories on the disk in your current drive, type

tree \Identify

To display, one screen at a time, the files in all the directories on drive C, type

tree c:\ /f | moreIdentify
/fDisplays the names of the files in each directory. Windows commands reference

To print a list of all the directories on drive C to a file, type

tree c:\ /f > <driveletter>:<filepath>\filename.txtIdentify
/fDisplays the names of the files in each directory. Windows commands reference
<drive>:Specifies the drive that contains the disk for which you want to display the directory structure.
<path>Specifies the directory for which you want to display the directory structure.
/fDisplays the names of the files in each directory.
/aSpecifies to use text characters instead of graphic characters to show the lines that link subdirectories.
/?Displays help at the command prompt.

Several platforms

from tldr-pages, CC BY 4.0

Show the contents of the current directory as a tree.

Print files and directories up to num levels of depth (where 1 means the current directory)

tree -L numIdentify

Trips 1 Sigma rule: informationalFile and Directory Discovery - Linux by Daniil Yugoslavskiy, oscd.community, CheraghiMilad

Print directories only

tree -dIdentify

Trips 1 Sigma rule: informationalFile and Directory Discovery - Linux by Daniil Yugoslavskiy, oscd.community, CheraghiMilad

Print hidden files too with colorization on

tree -a -CIdentify

Trips 1 Sigma rule: informationalFile and Directory Discovery - Linux by Daniil Yugoslavskiy, oscd.community, CheraghiMilad

Print the tree without indentation lines, showing the full path instead (use -N to not escape non-printable characters)

tree -i -fIdentify

Trips 1 Sigma rule: informationalFile and Directory Discovery - Linux by Daniil Yugoslavskiy, oscd.community, CheraghiMilad

Print the size of each file and the cumulative size of each directory, in human-readable format

tree -s -h --duIdentify

Trips 1 Sigma rule: informationalFile and Directory Discovery - Linux by Daniil Yugoslavskiy, oscd.community, CheraghiMilad

Print files within the tree hierarchy, using a wildcard (glob) pattern, and pruning out directories that don't contain matching files

tree -P '*.txt' --pruneIdentify

Trips 1 Sigma rule: informationalFile and Directory Discovery - Linux by Daniil Yugoslavskiy, oscd.community, CheraghiMilad

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 --pruneIdentify

Trips 1 Sigma rule: informationalFile and Directory Discovery - Linux by Daniil Yugoslavskiy, oscd.community, CheraghiMilad

Print the tree ignoring the given directories

tree -I 'directory_name1'Identify

Trips 1 Sigma rule: informationalFile and Directory Discovery - Linux by Daniil Yugoslavskiy, oscd.community, CheraghiMilad

Windows

from tldr-pages, CC BY 4.0

Display a graphical tree of the directory structure for a path.

Display the tree for the current directory

Display the tree for a specific directory

tree path\to\directoryIdentify

Display the tree for a directory including files

tree path\to\directory /fIdentify
/fDisplays the names of the files in each directory. Windows commands reference

Display the tree using aSCII characters instead of extended characters

tree path\to\directory /aIdentify
/aSpecifies to use text characters instead of graphic characters to show the lines that link subdirectories. Windows commands reference

What detects it

Sigma process creation rules that name tree
informationalFile and Directory Discovery - LinuxDaniil Yugoslavskiy, oscd.community, CheraghiMilad
informationalFile and Directory Discovery - MacOSDaniil Yugoslavskiy, oscd.community