The scull device in a book is simply a memory area (RAM). That way, when one overwrites it with a shorter file, it just becomes a smaller area of ββmemory (a shorter data area of ββthe device). Therefore, when the device is open for writing, the length must be truncated to 0 bytes (because we have not written anything yet. We just opened it for writing).
source share