Then, the buffer is filled by another read from the disk. When writing to files, data are written into a buffer until the buffer fills, and then, the contents of the buffer is written to disk. Most Unix systems run a daemon that regularly flushes buffers. Flush times usually vary from 15 seconds to 1 minute. People who run Unix on laptops often set very long flush times to minimize disk writes and power consumption to prolong battery life.
Ordinary users can flush buffers by using the sync command.
Buffers are also flushed when filesystems are unmounted using the umount command. File systems must be properly unmounted to ensure that all data are written to disk. If a floppy disk is popped out of the drive without having first been unmounted, data that remain in the buffer will be lost. Similarly, if someone turns off the power to a computer without having properly shutdown the computer, data that remain in output buffers are lost. The losses can be enormous.