日期:2014-05-16  浏览次数:20704 次

sync命令执行后以后还需要执行么?是永久性的还是一次性的
sync是把此次的内存输入写入到内存,(一次性)
还是从此以后,所有数据都不经过缓存直接到硬盘。(永久性)

------解决方案--------------------
`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.

貌似是一次性的吧
------解决方案--------------------
把写缓存里的内容写到硬盘上,一次性的。