0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

shutdown(8) のおさらい

Posted at

あまり使わんコマンドじゃけ、使い方を忘れちゃったので、忘備録として必要なトコを、man(1) から抜粋しておくw

停電対応📴

指定時間に os の停止をする
shutdown -p yymmddhhmm
日時の記述方法
yy 西暦の下二桁
mm 月を0付で二桁
dd 日を0付で二桁
hh 時間を24時間制の0付で二桁
mm 分を0付で二桁

日時の箇所に now を入れる事で即時実行
ex. 2025年11月9日 23時(午後11時)0分にACPIシャットダウン
env TZ=JST-09 /sbin/shutdown -p 2511092300
スイッチの説明
-p ACPIシャットダウン
-r reboot

チョットした小技も

普段、RTCUTC(GMT)で動かしおるけん、実際に日本時間(JST)へ計算するんも大義い💦けん、環境変数 TZ に御呪いを唱えてもらい、コマンドを実行しおることで、同じ結果を達成しちょる✌

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?