Forrest logo
back to the tree tool

tree:tldr:46ed9

tree: Print directories only.
$ tree -d
try on your machine

The command "tree -d" is used to display a directory tree structure in the command-line interface. Here's a breakdown of the command and its options:

  1. "tree": It is the main command that generates a graphical representation of the directory structure.
  2. "-d": This option specifies that it should only display directories, excluding files. By using this option, only the directory structure will be shown without any file names or details.

When you run the "tree -d" command, it will start at the current directory and show the entire hierarchical structure of directories beneath it, recursively. Each level of the tree is indented to denote its position within the hierarchy. Only directory names will be displayed, and subdirectories will be displayed beneath their respective parent directories.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the tree tool