--sort¶
The --sort
flag controls how files and directories are sorted before displaying the tree.
Usage¶
Options¶
name
— Sort alphabetically (default).size
— Sort by file or folder size (smallest → largest).
Examples¶
Sort by name (default)¶
Output (simplified):
Sort by size¶
Output (simplified):
Tip¶
You can combine --sort
with --order
to control ascending/descending order.