wapm install codeaye/erdtree
Need help using WAPM?Get started here
A bLazInGlY fAsT, skinnier version of the ancient tree command which displays a colorful depth indented listing of files with their memory sizes adjacent.
Usage: erdtree [directory] [options] ARGUMENTS: directory Directory to traverse. Defaults to current working directory. OPTIONS: -l Unsigned integer indicating many nested directory levels to display. Defaults to all. -p Comma-separated list of prefixes. Directories containing any of these prefixes will not be traversed. Their memory size will also be ignored. -s [asc|desc] Sort tree by memory-size. -h Displays help prompt.
$ cargo install --git https://github.com/solidiquis/erdtree
Download the binaries for your appropriate architecture from the releases section. Currently available are binaries for Darwin systems only.
$ brew tap solidiquis/tap $ brew install erdtree
As recommended in IEC 80000-13, this utility will report memory sizes
using SI units rather than binary units. As such you can expect
1KB = 1000B and not
1KiB = 1024B.
Q: Why did you make this? It's totally unnecessary.
A: I had two six-hour flights and got bored.
Q: Is it any good?
Q: How do you know that this is blazingly fast?
A: I wrote it in Rust.
This is not a rigorous way to perform benchmarks but here is how
erdtree compares with
tree in traversing a directory that is 3.5GB in size. Please note that
erdtree is not a 1-to-1 port of
tree as tree comes with many more sophisticated features that I felt most wouldn't use, but I've gotten enough interest that warranted this rough comparison.
$ time erdtree >> /dev/null erdtree >> /dev/null 0.35s user 1.55s system 99% cpu 1.918 total $ time erdtree >> /dev/null erdtree >> /dev/null 0.35s user 0.90s system 99% cpu 1.255 total $ time erdtree >> /dev/null erdtree >> /dev/null 0.35s user 0.89s system 99% cpu 1.253 total
$ time tree >> /dev/null tree >> /dev/null 0.64s user 1.04s system 99% cpu 1.690 total $ time tree >> /dev/null tree >> /dev/null 0.63s user 1.03s system 99% cpu 1.669 total $ time tree >> /dev/null tree >> /dev/null 0.63s user 1.05s system 97% cpu 1.719 total
Run it in the browser