Discrepancy between displayed file space usage and actual file size


Recommended Posts

Hi,

 

I just noticed that several files use space on my disks although these files are "empty". When I say "empty files" I mean files with a size of 0 bit. But even if these files are zero bit in size they still use space on the disk.

If I run ncdu or df -h the actual space is used but when I look at the different file there are zero bit in size.

I put several screenshots to explain this strange behavior.

Is there any logical explanation to that?

 

Thank you for your help.

2019-10-07_09h07_42.png

2019-10-07_09h07_13.png

2019-10-07_09h06_14.png

2019-10-07_09h05_54.png

2019-10-07_09h05_18.png

Link to comment

As I remember, when a file is created, two things happen.  First, an entry is created in the File table which contains such information as the name of file and, second, the location of the first sector where the data is to be stored.  So even if the file has no data, that sector is still allocated and will be until you delete the file.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.