Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
    
du already shows all files, it doesn't hide anything. What exactly are the 3GB and 525MB figures reported for? – Gilles Aug 19 '10 at 0:00
    
You should try 'ncdu' which is generally available in your distro's repositories, its text interface is great. – Shadok Apr 4 '12 at 16:02
    
You may also need to run as root, and not with sudo but with actual root, via su root. – Mikhail Nov 7 '12 at 14:44

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 .[!.]* *
share|improve this answer

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

du -sh ~

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

share|improve this answer

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.

share|improve this answer

When you do

du -shc *

it excludes everything that starts with a dot.

Try:

du -shc ~

instead

share|improve this answer
    
One of the common culprits for chewing space under your home dir is .TRASH, the default trash directory used by distributions like Ubuntu. – John T Aug 19 '10 at 1:25
1  
Strangely, this shows 150GB (which I think is the total of all my filesystem usage) - and none of the sub-directories or files. Pretty useless really – Stephen Aug 19 '10 at 1:49
    
@Stephen: you may have symlinks that are throwing things off. Try adding the -D option. – Dennis Williamson Aug 19 '10 at 6:46

Other possibilities for unaccounted for space (other than the very valid point about . files and * expansion others suggested) include the 5% of the disk that is occasionally reserved for root (relatively common) and files hidden underneath a mount point.

For that last, imagine you have a folder /tmp/somerandom/raccoon/. In this folder you put 2.5G of video. You then mount your USB disk on /tmp/somerandom/. You can no longer access the file/files that you put in /tmp/somerandom/raccoon, but they still take up disk space. du doesn't see them, but df does.

share|improve this answer

Disk Usage Analyzer does not show files (as I would expect) - if the % below a certain directory don't show up, then open the folder and look at the files individually.

share|improve this answer

You can use "find" + "du" to see the hidden files and folders:

find ~ -maxdepth 1 -exec du -hs {} \;
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .