Command

To get a list with the size of each item in a folder, you’ll want to use the du command like this:

The -m argument will return the listing in megabytes (note that you can use -h for human readable, but it won’t sort correctly)

Now we will want to run this through the sort command, sorting in reverse order -r and numeric -n:

The only problem here is that we’ll get way too much output if there are a lot of files and folders, so we can either pipe it through the more command:

Or we can just return the top 15 largest items:

This will return a listing something like this: