57
48

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

安全なcrontab修正手順

Last updated at Posted at 2012-12-26

例の如く上司に教わった安全な作業手順。
作業ディレクトリ作成&移動

mkdir -p ./`date '+%Y%m%d'`/crontab/
cd ./`date '+%Y%m%d'`/crontab/

現在のcrontabの設定のバックアップを作成。同時に編集用ファイルを作成。

crontab -l > crontab.org
crontab -l > crontab.edit

編集&現状の設定とdiffをとる

vi crontab.edit
crontab -l | diff crontab.edit -

適用&確認

crontab crontab.edit
crontab -l
57
48
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
57
48

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?