crontab: "/usr/bin/vi" exited with status 1

方法1:

在.vimrc 最下面加入

                                                             

autocmd filetype crontab setlocal nobackup nowritebackup




方法2 :如果上面的方法不管用 用nano先编辑下把

export EDITOR=nano

方法三:

扫描二维码关注公众号,回复: 2231945 查看本文章

1)  .bash_profile添加

alias crontab="VIM_CRONTAB=true crontab"

2) .vimrc添加

if $VIM_CRONTAB == "true"
    set nobackup
    set nowritebackup
endif


记得让环境变量生效 source ~/.bash_profile

猜你喜欢

转载自blog.csdn.net/ghostyusheng/article/details/81021126
今日推荐