I want to list all files in descending order based on disk usage, and have obtained the following commands from this:
To list the top 10 largest files from the current directory:
du . | sort -nr | head -n10To list the largest directories from the current directory:
du -s * | sort -nr | head -n10
However, they both list only directories.
How can I make du only include regular files in its output?
Bonus:
What is the following du option used for (it seems to have no effect)?:
-a, --all write counts for all files, not just directories