Dr. Mu,
I know that this is off-topic, but what you ran into there is likely a 'sparse file'. This is a file system feature that lets the system skip large chunks in the middle of a file that have no content. If you open a sparse file and put a character at offset 1E9, an OS that supports sparse files won't write all the intermediate blocks, just the one with the data, and a note of the offset of that block. It's a feature.