天天看點

no crontab for 的解決辦法

很多文章說進入編輯界面後按esc儲存退出就行了,在我這裡是不行的。

linux上第一次使用crontab時,會提示no crontab for xxx,crontab預設的編輯器是nano,有兩種解決方法:

1、nano的儲存退出方式

ctrl+x  儲存退出

ctrl+z  不儲存退出

2、修改crontab的編輯器為vim,執行export EDITOR='/usr/bin/vim'。或者直接選擇預設編輯器,執行select-editor

[email protected]:~/redmine-4.1.1-0/apps/redmine/htdocs$ select-editor

Select an editor.  To change later, run 'select-editor'.
  1. /bin/ed
  2. /bin/nano        <---- easiest
  3. /usr/bin/vim.basic
  4. /usr/bin/vim.tiny

Choose 1-4 [2]: 
           

來源:https://blog.csdn.net/yilovexing/article/details/78633670

繼續閱讀