I have an xml file that windows explorer says is 8.00KB on disk, and the size is 25.5 KB.
How is this possible?
I thought the size on disk is in many cases larger than the actual size (because of the block sizes)?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityI have an xml file that windows explorer says is 8.00KB on disk, and the size is 25.5 KB.
How is this possible?
I thought the size on disk is in many cases larger than the actual size (because of the block sizes)?
You are correct that the size on disk is normally larger. However, sometimes, due to built in compression, the file is actually smaller on the disk.
A file can also appear to be smaller on disk if the file is a sparse file. In that scenario, file size refers to the logical size of the file, whereas size on disk refers to the physical size of the sparse file.
mklink
at the command prompt. Make sure your test files are larger than 1K to avoid seeing a zero byte file for other reasons. See also Windows Confidential: Just What Is ‘Size on Disk’?
If you're using Microsoft OneDrive and some of your files are 'not synced' to disk, then the size of the file on disk will be smaller since the actual information is in the 'cloud' on OneDrive with only a pointer.