如果在crontab -e 退出時無法保存

今天最小化安裝完centos7.2後,發現在退出crontable 時無法保存,提示出下:

[root@localhost ~]# crontab -e
no crontab for root - using an empty one
crontab: installing new crontab
"/tmp/crontab.5wI27z":1: bad minute
errors in crontab file, can't install.
Do you want to retry the same edit?
Enter Y or N

解決方案:

echo export EDITOR=/usr/bin/vi >> ~/.bashrc

即可解決。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章