About Red Hat Partner Programmes Training Support and Docs Products and Services
  downloadstorecart
red hat logo search    
redhat.comredhat network
Red Hat Documentation: man pages: man2: Linux Programmer's Manual (2)

Manpage of SYNC

SYNC

Section: Linux Programmer's Manual (2)
Updated: 15 April 2025
Index  

NAME

sync - commit buffer cache to disk.  

SYNOPSIS

#include <unistd.h>

int sync(void);  

DESCRIPTION

sync first commits inodes to buffers, and then buffers to disk.  

RETURN VALUE

sync always returns 0.  

CONFORMING TO

SVr4, SVID, X/OPEN, BSD 4.3  

BUGS

According to the standard specification (e.g., SVID), sync() schedules the writes, but may return before the actual writing is done. However, since version 1.3.20 Linux does actually wait. (This still does not guarantee data integrity: modern disks have large caches.)  

SEE ALSO


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
CONFORMING TO
BUGS
SEE ALSO

This document was created by using the manual pages.
Time: 11:56:07 GMT, March 24, 2025

 

 
 
© 2001 Red Hat, Inc. All rights reserved.       About Red Hat   :   Legal statement   :   Privacy statement   :   Y2K statement   :   Contact Red Hat