红联Linux门户
Linux帮助

请教一个关机命令shutdown

发布时间:2011-01-05 11:04:59来源:红联作者:vernice
[i=s] 本帖最后由 vernice 于 2011-1-5 11:41 编辑 [/i]

执行shutdown命令时,自动执行sync吗?
文章评论

共有 10 条评论

  1. tzzjchao 于 2011-02-28 10:17:56发表:

    学习中,多谢啦!

  2. 花开花败2011 于 2011-02-12 20:15:40发表:

    我顶

  3. zing840828 于 2011-01-06 15:33:29发表:

    执行shutdown 的时候系统会自动调用sync的;但是你自己多执行几次也没有坏处!
    sync;syns;shutdown -h now

  4. taoty 于 2011-01-05 23:32:03发表:

    halt

  5. mg271603433 于 2011-01-05 16:39:13发表:

    路过,看看

  6. jid_223 于 2011-01-05 12:00:33发表:

    shutdown 命令应该根据带的参数不同而执行的方式也不同吧

  7. vernice 于 2011-01-05 11:41:42发表:

    4# 奶茶dsk


    嗯,多谢指点。这本书是09年的,Fedora9的~

  8. 奶茶dsk 于 2011-01-05 11:39:46发表:

    man reboot
    -n Does not call sync(2) before performing the reboot; this could result in data loss. On Linux, this proba-\r
    bly has no effect as the kernel flushes all write buffers before shutting down
    .
    你看的资料有些年头了,随便翻翻吧,
    有不确定就去查查man,

  9. vernice 于 2011-01-05 11:35:50发表:

    2# 奶茶dsk


    我看资料时,感觉他说的模模糊糊的。reboot -n是不执行sync的。不知道shutdown和reboot是不是都自动执行了~

  10. 奶茶dsk 于 2011-01-05 11:30:29发表:

    我记得要手动执行sync是很久前的事了,,
    shutdown应该会自动做的,