Online Linux Terminal Logo
OnlineLinuxTerminal
NavigationCLI Manual

$tree

Display directory structure in a recursive visual tree diagram.

Syntaxe de la commandePOSIX Standard
tree [OPTIONS] [DIRECTORY]
Communauté Linux2.4k En ligne

Échangez avec des utilisateurs Linux, apprenez des commandes et téléchargez des PDF.

Essayer en direct dans le bac à sable interactif

Simulation côté client sans installation avec retour instantané.

Ouvrir dans le terminal plein écran ↗
bash — terminal

Aperçu et fonctionnement

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

Options et drapeaux courants

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

Exemples pratiques du monde réel

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

Outputs folder tree hierarchy.