Online Linux Terminal Logo
OnlineLinuxTerminal
NavigationCLI Manual

$tree

Display directory structure in a recursive visual tree diagram.

BefehlssyntaxPOSIX Standard
tree [OPTIONS] [DIRECTORY]
Linux-Community2.4k Online

Tausche dich mit Linux-Nutzern aus, lerne Befehle und lade PDF-Cheatsheets herunter.

Live im interaktiven Terminal ausprobieren

Client-seitige Simulation ohne Installation mit sofortigem Feedback.

Im Vollbild-Terminal öffnen ↗
bash — terminal

Überblick & Funktionsweise

`tree` is a recursive directory listing program that produces a depth-indented visual tree of files and folders.

Wichtige Optionen und Flags

Flag / OptionDescription
-L [level]Max display depth of the directory tree.
-dList directories only without listing files.
-aAll files are listed including hidden files.

Praktische Anwendungsbeispiele

#1Visualize directory tree up to depth 2
tree -L 2 /home/user

Outputs folder tree hierarchy.