linux system command "sync"

The Linux sync command is used for data synchronization. The sync command is used when shutting down the Linux system.
In the Linux system, the data to be written to the hard disk is sometimes efficient. It is written to the filesystem buffer. This buffer is a memory space. If the data to be written to the hard disk is stored in this buffer, and the system suddenly breaks If you power on, the data will be lost, and the sync command will force the data stored in the buffer to be written to the hard disk.
grammar

system(“sync”);

Published 53 original articles · praised 16 · visits 2213

Guess you like

Origin blog.csdn.net/m0_37757533/article/details/102521437