The Lseek function displays the offset for an open file, and the file offset can be greater than the current length of the file, in which case the next write to the file will be extended and a hole in the file is allowed. Bytes that are in the file but not written are read as 0.
eg
The HOLEFILE.C function creates a file with empty, running observations:
As you can see, the 30 non-written bytes in the file are set to read as 0. A 7-digit number at the beginning of each line is the byte offset represented in eight binary form.
Compare the file you just created with the same length but the dance hole file
Although the length of the two files is the same, the empty file occupies 20 disk blocks, while the empty file occupies only 8 disk blocks.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Unix-Files form an empty analysis