|
Hopefully, this page is exactly what you are looking for, but if not, you can always find further assistance on Unix/Linux Forum!
FSYNC(2) Linux Programmer's Manual FSYNC(2)
NAME
fsync, fdatasync - synchronize a file's complete in-core state with
that on disk
SYNOPSIS
#include <unistd.h>
int fsync(int fd);
int fdatasync(int fd);
DESCRIPTION
fsync() copies all in-core parts of a file to disk, and waits until the
device reports that all parts are on stable storage. It also updates
metadata stat information. It does not necessarily ensure that the
entry in the directory containing the file has also reached disk. For
that an explicit fsync() on the file descriptor of the directory is
also needed.
fdatasync() does the same as fsync() but only flushes user data, not
the meta data like the st_atime or st_mtime (respectively, time of last
access and time of last modification; see stat(2)).
RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is
set appropriately.
ERRORS
EBADF fd is not a valid file descriptor open for writing.
EIO An error occurred during synchronization.
EROFS, EINVAL
fd is bound to a special file which does not support synchro-
nization.
NOTES
In case the hard disk has write cache enabled, the data may not really
be on permanent storage when fsync() / fdatasync() return.
When an ext2 file system is mounted with the sync option, directory
entries are also implicitly synced by fsync().
On kernels before 2.4, fsync() on big files can be inefficient. An
alternative might be to use the O_SYNC flag to open(2).
CONFORMING TO
POSIX.1b (formerly POSIX.4)
SEE ALSO
bdflush(2), open(2), sync(2), mount(8), sync(8), update(8)
Linux 1.3.85 2001-04-18 FSYNC(2)
Man(1) output converted with
man2html and wrapped by fishsponge
This page was generated on Tue Feb 13 02:17:44 GMT 2007
|
Your favourite pages:
No pages logged yet. Trying to save cookie... Top 10 most popular pages:
sqlite3 man page (5323 hits) (openSUSE 10.2)
svn man page (5171 hits) (FreeBSD 6.2)
adv_cap_autoneg man page (4865 hits) (Solaris 10 11_06)
CPAN man page (4602 hits) (Suse Linux 10.1)
ssh man page (4337 hits) (Suse Linux 10.1)
ssh-socks5-proxy-connect man page (2841 hits) (Solaris 10 11_06)
netcat man page (2688 hits) (Suse Linux 10.1)
pprosetup man page (2472 hits) (Solaris 10 11_06)
startproc man page (2452 hits) (Suse Linux 10.1)
signal man page (2393 hits) (Suse Linux 10.1)
|