Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When checking the properties of my Downloads folder I saw that it said

Total Size on Files: 5.3GB Size on Disk: 43.0GB

o__O I have noticed this in Windows, but I've been too lazy to inquire further because the difference was only a few percentage. Is this because of the different file system that Linux uses? Is this normal?

share|improve this question
1  
I think this happens if you use pcmanfm file manager (i.e. Lubuntu). The bug is fixed: sourceforge.net/tracker/… -- sourceforge.net/tracker/… –  medigeek Jun 13 '12 at 6:59

2 Answers 2

up vote 4 down vote accepted

The smallest amount of space which can be allocated on disk is called a "sector" - historically it's been 512 bytes, but newer hard disks have larger sectors of 4096 bytes (though I'm not sure if "logical sectors" are 4096 bytes too or they're still 512 bytes).

So if you have a file just 1 byte in size, it will still occupy 512 bytes on disk.

Most files are far larger than a few bytes, so the difference is usually just a few percent. I'm not sure if you have hundreds of millions of tiny files in your Downloads folder, but that would explain this behavior.

share|improve this answer

This is probably due to a lot of small files, every file takes at least the space of 1 block or sector. The other way around is also possible, with sparse files. You can have a file with a size of several gigabytes, only taking a couple of kilobytes in disk (ls -lh and du -sh on the file will show this difference). A large string of 0-bytes is not stored on the disk, but is stored as meta data ("byte X til X + 10013434 are 0").

share|improve this answer
    
du -h | cut -f1 | sort -h | uniq -c | sort -rn | head First column will contain the count, second column the approximate file size. If you have a lot of small files, the count will be high for the top few lines with size < 4k. –  jippie Apr 15 '12 at 8:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.