Use erdtree (erd) CLI
masterThe erd command is a filesystem and disk-usage utility. The basic syntax is:
erd [OPTIONS] [DIR]
By default, it traverses the current working directory. You can specify any directory as an argument.
Common Usage Patterns
- Human-readable output: Use
-Hor--humanto see sizes in a readable format (e.g., KB, MB, GB). - Change layout: Use
-y, --layout <LAYOUT>to switch betweenregular,inverted,flat, oriflatviews. - Filter by type: Use
-t, --file-type <FILE_TYPE>to restrict results tofile,dir, orlink. - Search with patterns: Use
-p, --pattern <PATTERN>for regex, or enable--glob/--iglobfor glob-based searching.
erd [OPTIONS] [DIR]