Write Cache command--sync
After starting the UNIX system with the reboot command, the system prompts for an error message and some applications do not work properly. After careful examination of system files, and the initial correct backup to compare, found that some files are indeed corrupted, toss and turn to find the cause of the file is destroyed, and finally thought of the write Cache command--sync, reboot before running sync command, resulting in the system file changes and does not work properly.
The sync command runs the Sync subroutine. If the system must be stopped, run the sync command to ensure the integrity of the file system. The Sync command writes all of the system buffers that are not written to disk, including modified I-node, deferred block I/O, and read-write mapping files.
The sync command is to send the memory resident information about the file system into the physical media. Before pausing the system, for example, to reboot the machine, be sure to perform the sync command. Unix system experience shows that, to ensure reliability, you should perform the two sync command because the Sync command does not guarantee that the information is actually written to disk, although the command has been executed once. After the sync command is executed, wait for the disk work light to go out (assuming there is a system operating indicator), and then really suspend the machine or start the machine.
Damage to the UNIX system is something that can happen at any time, so be sure to run the sync command before starting the machine or shutting down the machine. Remember that in any case, careful execution of the sync command will never do any harm.