sync命令用于强制将更改的内容立即写入磁盘,信息更新非常快。 在Linux/Unix系统上,通过在处理文件和数据时将其放入内存缓冲区,并根据需要写入磁盘,提高系统的运行效率。
可以使用sync命令将内存缓冲区中的数据立即写入磁盘。 通常,用户不需要运行sync命令,系统会自动执行update或bdflush操作,将缓冲区中的数据写入磁盘。 只有在update或bdflush无法运行或用户必须成功关闭时,才需要手动运行sync命令。
语法: sync [参数]
常规参数:
--help显示命运的详细帮助信息
- -版本显示版本号
参考示例
显示帮助信息:
[root@linuxcool ~]# sync --help
usage : sync [选项]
Force changed blocks to disk,更新the super block。
- -帮助显示his help and exit
- versionoutputversioninformationandexit
GNU coreutils在线帮助:
For complete documentation,run : info coreutils ' sync invocation '
显示版本:
[ root @ linuxcool~] # sync-- version
同步(计算) 8.22
版权(c ) 2013自由软件基础,Inc。
许可证gplv 3: gnugplversion3orla ter。
this is freesoftware 3360 youarefreetochangeandredistributeit。
There is NO WARRANTY,to the extent permitted by law。
Written by Jim Meyering。