linux sync

来源:互联网 发布:unity3d obj 文件导入 编辑:程序博客网 时间:2024/06/13 21:18

Description

Flush file system buffers。Synchronize data on disk with memory. Force changed blocks to disk, update the super block. ‘sync’ writes any data buffered in memory out to disk. This can include (but is not limited to) modified superblocks, modified inodes, and delayed reads and writes. This must be implemented by the kernel; The ‘sync’ program does nothing but exercise the ‘sync’ system call. The kernel keeps data in memory to avoid doing (relatively slow) disk reads and writes. This improves performance, but if the computer crashes, data may be lost or the file system corrupted as a result. The ‘sync’ command ensures everything in memory is written to disk.

man sync

NAME       sync - flush file system buffersSYNOPSIS       sync [OPTION]DESCRIPTION       Force changed blocks to disk, update the super block.

强制将内存中的文件缓冲内容写到磁盘。

Example

csdn@linux: ~$ cp -rf x ycsdn@linux: ~$ sync
0 0
原创粉丝点击