如何自動關機: - Linux

By Delia
at 2015-09-04T11:09
at 2015-09-04T11:09
Table of Contents
有時候要跑比較久的程序,又不想待在電腦前等他跑完。
希望跑完可以自動關機。
想請教自動關機的方法。
如果是一行指令:
# dd -if /dev/sda2 -of /dev/sdb3 ; poweroff
(記得要有關機的權限。)
之前學到另一個指令:
# wait pid ; poweroff
(但是wait提示只能關測子程序。)
`wait`運作的原理好像是子程序完成後會有回傳值,依此關機。
如果不是子程序怎麼做?
像是常常在xwindow下工作,要怎麼在xwindow下實現程序結束後關機?
(像winff轉檔、備份工作。)
(這些好像都可以搬到命令列作……。)
請問一下,切換終端時(tt1-7), 原本的終端會繼續工作嗎?
還是要用命令喚醒?
如果程序跑完後會提示:`請按任意鍵繼續`
會算是未結束吧?有什麼辦法避免嗎?
--
不要哭。要知道值得你哭的人,不會讓你哭。
別騙人。因為會被你騙的,都是相信你的人。
不要去追。人家神隱,就是不想看見你。
不用和事。當事人吵架,就是想戰。
--
Tags:
Linux
All Comments

By Hedy
at 2015-09-06T02:09
at 2015-09-06T02:09

By Zenobia
at 2015-09-08T05:39
at 2015-09-08T05:39

By Connor
at 2015-09-12T04:43
at 2015-09-12T04:43

By Jacky
at 2015-09-14T08:09
at 2015-09-14T08:09

By Zora
at 2015-09-18T08:44
at 2015-09-18T08:44

By Christine
at 2015-09-22T06:21
at 2015-09-22T06:21
Related Posts
NFS Server監看有哪些client mount上來?

By Charlotte
at 2015-09-03T23:57
at 2015-09-03T23:57
請問怎麼決driver在compiler後會放在哪裡

By Iris
at 2015-09-03T19:29
at 2015-09-03T19:29
[問題自動轉換中文輸入

By Poppy
at 2015-09-03T10:18
at 2015-09-03T10:18
硬碟空間閒置的問題

By Ophelia
at 2015-09-02T20:40
at 2015-09-02T20:40
Centos sh 變數設定都有\r

By Freda
at 2015-09-02T18:05
at 2015-09-02T18:05