Visualize nested files and directories.
Section: Listing and Inspection
Show directory tree to a depth
bash
bash
tree -L 2Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Listing and Inspection
Long listing with human sizes
Show detailed directory contents with human-readable sizes.
Show detailed file metadata
Inspect inode, permissions, timestamps, and ownership.
Create nested directories
Create a directory path including missing parents.
Copy directory recursively with preserved metadata
Copy directory trees while preserving timestamps and mode when possible.