I have come across these two terms and my understanding of them seem to overlap with each other. Flush is used with buffers and sync is used to talk about persisting changes of file to disk.
In C, fflush(stdin) makes sure that the buffer is cleared. And fsync to persist changes file to disk.
If these concepts are not universally defined, would prefer a linux, java explanation.
I found a related post, but ir doesn't really answer my question. Really force file sync/flush in Java
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…