sync 中文man页面

系统
sync 把任何在内存中缓冲的数据写到磁盘上。这能包括(但不仅限于)修改了的超级块, i 节点,和延迟的读写。这必须由内核执行; sync 除了执行 sync(2) 系统调用外什么都不做.

NAME 名称

sync - 同步内存与磁盘的数据  

总览

sync [--help] [--version]  

描述

sync 把任何在内存中缓冲的数据写到磁盘上。这能包括(但不仅限于)修改了的超级块, i 节点,和延迟的读写。这必须由内核执行; sync 除了执行 sync(2) 系统调用外什么都不做.

内核把数据保持在内存里以避免磁盘读写(磁盘相对来说比较慢)这能改进性能,但如果计算机跨掉,结果就可能是数据丢失,或者文件系统损坏. sync 保证任把何在内存里的东西写入磁盘.

sync 应该在处理器异常停止前调用 (例如,在因为调试新的内核代码引起内核恐慌(?可能是灾难发生吧)之前) 一般而言,处理器应该使用 shutdown(8) 或者 reboot(8) 或者 halt(8) 命令来停止, 那会试图,在调用 sync(2) 前让系统处于静止状态. (这些命令有好几种不同的实现,请参考你的文档,在一些系统上你不能直接调用 reboot(8) 和 halt(8)  

GNU 标准选项

--help
在标准输出上印出用法信息并退出。
--version
在标准输出上印出版本信息并退出。
--
结束选项列表

环境(变量)

变量 LANG, LC_ALL, LC_CTYPE 和 LC_MESSAGES 有通常的意义.  

遵循

POSIX 1003.2  

注意

在 Linux 上, sync 仅保证安排脏数据块进入等待:实际上在真正写入前要花费一点时间. reboot(8) 和 halt(8) 在调用 sync(2) 之后会睡眠几秒以考虑这些延时.

这份 sync 的描述可以在 fileutils-4.0 包你找到; 其他版本也许有些微的差别. 把修正和新增邮到 aeb@cwi.nl. 程序缺陷邮到 fileutils-bugs@gnu.ai.mit.edu.  

又见

sync(2), halt(8), reboot(8), update(8)
#p#

NAME

sync - flush filesystem buffers  

SYNOPSIS

sync [OPTION]  

DESCRIPTION

Force changed blocks to disk, update the super block.

--help
display this help and exit
--version
output version information and exit

AUTHOR

Written by Jim Meyering.  

REPORTING BUGS

Report bugs to <bug-coreutils@gnu.org>.  

COPYRIGHT

Copyright © 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  

SEE ALSO

The full documentation for sync is maintained as a Texinfo manual. If the info and sync programs are properly installed at your site, the command

info coreutils sync

should give you access to the complete manual.

责任编辑:韩亚珊 来源: CMPP.net
相关推荐

2011-08-24 16:48:36

man中文man

2011-08-15 10:21:09

man中文man

2011-08-11 16:11:49

at中文man

2011-08-25 10:21:56

man.conf中文man

2011-08-25 15:39:42

fcloseall中文man

2011-08-25 15:00:15

cfgetispeed中文man

2011-08-25 09:29:35

udp中文man

2011-08-19 18:35:50

issue中文man

2011-08-25 17:03:51

pclose中文man

2011-08-25 17:40:25

setvbuf中文man

2011-08-23 14:21:16

poweroff中文man

2011-08-25 16:10:52

fgets中文man

2011-08-24 15:52:59

intro中文man

2011-08-23 13:40:31

2011-08-25 15:54:08

ferror中文man

2011-08-25 14:40:27

basename中文man

2011-08-25 17:24:54

puts中文man

2011-08-24 18:05:31

SHOW中文man

2011-08-25 18:34:55

ungetc中文man

2011-08-23 10:03:40

useradd中文man
点赞
收藏

51CTO技术栈公众号