<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://jackxiang.com/post//</link>
<title><![CDATA[[实践OK]Linux关机重启动命令在 Read-only file system时用init和shutdow时的区别，shutdown -h now 关不了提示Bus error，用init 0就能关掉。]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Unix/LinuxC技术]]></category>
<pubDate>Sat, 02 Feb 2013 13:50:49 +0000</pubDate> 
<guid>http://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	Linux关机重启动命令在 Read-only file system时用init和shutdow时的区别，shutdown -h now 关不了提示Bus error，用init 0就能关掉：<br/><textarea name="code" class="php" rows="15" cols="100">
[root@itv-api_php_bj_szq_10_70_33_3* ~]# shutdown -h now
Bus error (core dumped)
-bash: /data/logs/.syshistory/bash_history.log: Read-only file system
[root@itv-api_php_bj_szq_10_70_33_3* ~]# id
uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
-bash: /data/logs/.syshistory/bash_history.log: Read-only file system
[root@itv-api_php_bj_szq_10_70_33_3* ~]# init 0
-bash: /data/logs/.syshistory/bash_history.log: Read-only file system
</textarea><br/><br/><br/>1）终端关闭：linux - shutdown -h now 立即关机：shutdown -h now&nbsp;&nbsp;halt&nbsp;&nbsp;&nbsp;&nbsp;poweroff<br/>shutdown -r 18:23:52 #定时重启在18点23分52秒关闭,-r 是restart的意思，即重启含义。<br/>shutdown -h now&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#即h是halt的意思，poweroff就是立即关机的含义，不再重新启动。<br/><br/>Broadcast message from root@raspberrypi (pts/0) (Sat Feb&nbsp;&nbsp;2 13:51:35 2013):<br/>The system is going down for system halt NOW!<br/>[ 8458.116208] Power down.<br/><textarea name="code" class="php" rows="15" cols="100">
 sudo shutdown &quot;now&quot; -r&nbsp;&nbsp;//需要有root权限。
 shutdown -r now 立即重启。
</textarea><br/>该命令的一般格式&nbsp;&nbsp;&nbsp;&nbsp;shutdown [选项] [时间] [警告信息] 命令中各选项的含义为: 　　- k 并不真正关机而只是发出警告信息给所有用户　　　　- r 关机后立即重新启动　　　　- h 关机后不重新启动　　　　- f 快速关机重启动时跳过fsck　　　　- n 快速关机不经过init 程序　　　　- c 取消一个已经运行的shutdown 需要特别说明的是该命令只能由超级用户使用。 例1，系统在十分钟后关机并且马上重新启动&nbsp;&nbsp; # shutdown –r +10 例2，系统马上关机并且不重新启动&nbsp;&nbsp; # shutdown –h now <br/><br/>2)init 0 立即关机,init 6 重启。<br/><br/>3）reboot 重启<br/><br/>QA:<br/>Init 6是重新启动机器。<br/>reboot也是重新启动机器。<br/>那么这两个命令到底有什么区别呢？<br/>对这两个操作使用man命令看到的内容如下：<br/>&quot;init 6&quot; 基于一系列/etc/inittab文件，并且每个应用都会有一个相应shutdown脚本。<br/>&#039;init 6&#039; 调用一系列shutdown脚本(/etc/rc0.d/K*)来使系统优雅关机;<br/>&#039;reboot&#039;并不执行这些过程，reboot更是一个kernel级别的命令，不对应用使用shutdown脚本。 .<br/>我们应该在通常情况下使用 init 6.<br/>reboot - reboot performs a sync(1M) operation on the disks, and then a<br/>multi- user reboot is initiated. See init(1M) for details.<br/>init 6 Stop the operating system and reboot to the<br/>state defined by the initdefault entry in<br/>/etc/inittab.<br/>在出问题的状况下或强制重启时使用reboot.<br/><br/>更多参考：http://www.cnblogs.com/summergarden/archive/2013/01/12/2857754.html
]]>
</description>
</item><item>
<link>http://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] [实践OK]Linux关机重启动命令在 Read-only file system时用init和shutdow时的区别，shutdown -h now 关不了提示Bus error，用init 0就能关掉。]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>