Space on disk much larger than actual filesizes

Alex Lam S.L. alexlamsl at gmail.com
Fri May 18 19:58:04 UTC 2012


Looking at the output, the HDD is reported to have a block size of 4KiB.

IIRC, each file in the system will occupy at least one block, i.e. the
disk space consumed is always a multiple of 4KiB.

I think the discrepancy you have observed here is due to existence of
lots of small files (conf, small utilities etc.) on disk. So I
wouldn't be too alarmed by that.


HTH,
Alex.



On Fri, May 18, 2012 at 5:59 PM, Keith Clark <keithclark at k-wbookworm.com> wrote:
> On 12-05-17 09:08 PM, Jonathan Marsden wrote:
>>
>> Keith,
>>
>> On Thu, 17 May 2012 Keith Clark<keithclark at k-wbookworm.com>  wrote:
>>
>>> ... I've noticed that every directory is showing about 8x's more
>>> space taken up on the disk than the actual combined filesizes.  One
>>> directory has 114 MB on it, but it is taking up 918 MB of space on
>>> the disk.
>>
>> Which software tools have you used to obtain the two numbers you
>> mention?  A specific example would help.  Is there anything unusual
>> about this filesystem or how it was created?
>>
>> In what follows, I am using /path/to/dir to mean "the path to
>> the 'One directory' that you are referring to", since you didn't
>> actually tell us what it is :)
>>
>> In a Terminal (LXTerminal) window, at a shell prompt, you can do
>>
>>   sudo find /path/to/dir -print0 |sudo xargs -0 stat --printf "%b\t%n
>> \n" |sort -n
>>
>> to get a sorted list of all the files concerned (including all hidden
>> files) preceeded by their sizes in kiloBytes. If that doesn't reveal
>> the cause of the issue to you, please email (or pastebin, and provide
>> links in email) the the results of running:
>>
>>   sudo du -sk /path/to/dir |sort -n
>>
>> which should list all files or directories at that level and their sizes
>> in kiloBytes, and
>>
>>   stat -f /path/to/dir
>>
>> and lastly
>>
>>   df -hk /path/to/dir
>>
>> This should get us useful info about what files are in the directory,
>> their sizes, and info about the filesystem they are being stored on,
>> including its block size.
>>
>> In case the cause is really obscure, maybe also post the output of
>>
>>   sudo tune2fs -l $(df -h /path/to/dir |grep ^/ |cut -d " " -f1)
>>
>> which should provide a lot of technical info about the filesystem.
>>
>> Thanks,
>>
>> Jonathan
>
> It is with the File Manager and selecting Properties that these numbers are
> being reported.  Gparted also confirms that a large amount of space has
> already been consumed.
>
> Every directory shows about 8x's the actual filesizes.
>
> I will review the rest of your reply later in the day as time allows.
>
> Thanks!
>
> Keith
>
>
>
> --
> Lubuntu-users mailing list
> Lubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/lubuntu-users



More information about the Lubuntu-users mailing list