sync, syncfs - commit filesystem caches to disk
#include <unistd.h> void sync(void); int syncfs(int fd); Feature Test Macro Requirements for glibc (see feature_test_macros(7)): sync(): _XOPEN_SOURCE >= 500 || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* Glibc versions <= 2.19: */ _BSD_SOURCE syncfs(): _GNU_SOURCE
sync() causes all pending modifications to filesystem metadata and cached file data to be written to the underlying filesystems. syncfs() is like sync(), but synchronizes just the filesystem containing file referred to by the open file descriptor fd.
syncfs() returns 0 on success; on error, it returns -1 and sets errno to indicate the error.
sync() is always successful. syncfs() can fail for at least the following reason: EBADF fd is not a valid file descriptor.
syncfs() first appeared in Linux 2.6.39; library support was added to glibc in version 2.14.
sync(): POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD. syncfs() is Linux-specific.
Since glibc 2.2.2, the Linux prototype for sync() is as listed above, following the various standards. In glibc 2.2.1 and earlier, it was "int sync(void)", and sync() always returned 0. According to the standard specification (e.g., POSIX.1-2001), sync() schedules the writes, but may return before the actual writing is done. However Linux waits for I/O completions, and thus sync() or syncfs() provide the same guarantees as fsync called on every file in the system or filesystem respectively.
Before version 1.3.20 Linux did not wait for I/O to complete before returning.
sync(1), fdatasync(2), fsync(2)
This page is part of release 4.09 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
More Linux Commands
auparse_get_field_int(3) - get current field's value as an i
auparse_get_field_int allows access to the value as an int of the current field of the current record in the current event. RETURN VALUE Returns -1 if there is
gnutls_x509_crt_verify_data(3) - API function (Man Page)....
This function will verify the given signed data, using the parameters from the certificate. Deprecated. Please use gnutls_pubkey_verify_data(). RETURNS In case
clnttcp_create(3) - library routines for remote procedure ca
These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the s
gcjh-4.6(1) - - generate header files from Java class files
The gcjh program is used to generate header files from class files. It can generate both CNI and JNI header files, as well as stub implementation files which ca
asn1_delete_structure2(3) API function - Linux manual page
asn1_delete_structure2.3 - Deletes the structure * structure . At the end, * structure is set to NULL. RETURNS ASN1_SUCCESS if successful, ASN1_ELEMENT_NOT_FOUN
XDrawArcs(3) - draw arcs and arc structure - Linux man page
XDrawArc draws a single circular or elliptical arc, and XDrawArcs draws multiple circular or elliptical arcs. Each arc is specified by a rectangle and two angle
SDL_GetEventFilter(3) - Retrieves a pointer to he event filt
This function retrieces a pointer to the event filter that was previously set using SDL_SetEventFilter. An SDL_EventFilter function is defined as: typedef int (
grolj4(1) - groff driver for HP Laserjet 4 family (ManPage)
grolj4 is a driver for groff that produces output in PCL5 format suitable for an HP Laserjet 4 printer. There is an additional drawing command available: \DR dh
split(1) - split a file into pieces - Linux manual page.....
Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, ...; default size is 1000 lines, and default PREFIX is x. With no INPUT, or when INPUT is -, read stand
box(3ncurses) - create curses borders, horizontal and vertic
The border, wborder and box routines draw a box around the edges of a window. Other than the window, each argument is a character with attributes: ls - left sid
Tcl_FSFileAttrsGet(3) - procedures to interact with any file
There are several reasons for calling the Tcl_FS API functions (e.g. Tcl_FSAccess and Tcl_FSStat) rather than calling system level functions like access and sta
FcDirSave(3) - DEPRECATED: formerly used to save a directory
This function now does nothing aside from returning FcFalse. It used to creates the per-directory cache file for dir and populates it with the fonts in set and