Command, File Operations, General, HowTo

List subfolders in a directory with human-readable folder size

If you want to list subfolders in a directory with human-readable content size in them then you can use this command:

du -h --max-depth=1

Here –max-depth=1 indicates that we don’t want to parse the subdirectories of subdirectories that currently we are showing size for. The output will look like this:

This answers the question: How to list subdirectories with size?

Leave a Reply

Your email address will not be published. Required fields are marked *