How to sync a file on FreeBSD?

Unga unga888 at
Fri Jul 22 06:44:01 UTC 2011

Hi all

How to sync a file on FreeBSD (esp. on 8.1) to disk?

I used fsync(2), but does not immediately flush to disk.

I want my writing to a file (a log file) immediately available to other users to read.

Best regards

More information about the freebsd-questions mailing list