Hidden files in Disk Usage Analyzer

How do I get Ubuntu's "Disk Usage Analyzer" to show me the hidden files?

It tells me my home dir uses 3GB, but only accounts for 525MB (the results of du -shc *). Can I get it to show me the other files that are using the space?


Solution 1:

You can use this (it does not match files with a single letter after the '.')

du -shc .??* *

wikipedia also mentions a regex style usage which should work for every file/folder name

du -shc .[!.]* *

Solution 2:

Call du with the whole home directory rather than every single file:

du -sh ~

That's because the * doesn't match the hidden ones.

Solution 3:

I got a similar problem today. My solution:

du -h | awk -F/ '{if (NF<3) {print $1"/"$2}}'

du -h gives us the complete usage of current directory including all subdirectories recursively.

| awk -F/ '{if (NF<3) {print $1"/"$2}}' filters the output and prints no subdirectories.

If you want to see the files in addition to the directories you can use this:

du -ah | awk -F/ '{if (NF<3) {print $1"/"$2}}'

If you want to see exactly which files use the most disk space you can add | sort -h at the end.