[英]unable to save crontab file using CLI
I am new to linux centos ,i am trying to save and exit crontab in centos. 我是Linux centos的新手,我试图在centos中保存并退出crontab。
I have used CLI. 我已经使用了CLI。
crontab -e
when i press esc key from my keyboard it says ":quit to exit: and i press ":quit" and press enter key from keyboard crontab exit without saving. 当我从键盘上按Esc键时,它说“:quit退出:”,然后按“:quit”,然后从键盘crontab退出按Enter键而不保存。
You can set vi as your default crontab editor using the command. 您可以使用以下命令将vi设置为默认的crontab编辑器。 export EDITOR=vi
导出EDITOR = vi
Then you can save and exit crontab using :wq. 然后,您可以使用:wq保存并退出crontab。
It seems you edit your crontab in vim
. 看来您在
vim
编辑了crontab。 Use :x
to save and quit at the same time. 使用
:x
可以同时保存并退出。 Details: http://vim.wikia.com/wiki/Saving_a_file . 详细信息: http : //vim.wikia.com/wiki/Saving_a_file 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.