In this post, the answer said
Flushing: To sync the temporary state of your application data with the permanent state of the data (in a database, or on disk).
I think that the flush is executed when some buffer is written to an i/o device (like disk) by the write()
system call.
So it seems that a data writing to a device with write()
and the data flushing to the device are to do the same things.
If so, can I say that the flushing a data with fflush()
and the writing the data with write()
are completely same?