Using `eza` to find large files in a directory
Eza is an enhanced version of ls
that has a bunch of nice extra features. A few of its options are useful for finding big files in a directory.
-T
will recurse through subdirectories and show the results as a tree--total-size
will calculate sizes for directories as well as files--sort=size
will sort the results by size.
eza -lT --total-size --sort=size
You can also use the -D
flag to limit to only include directories in the results if there are too many small files to enumerate. Or use the --level=4
flag to limit the depth of directory to recurse to.