博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
第一次使用crontab linux选择编辑器问题
阅读量:7120 次
发布时间:2019-06-28

本文共 708 字,大约阅读时间需要 2 分钟。

第一次使用crontab linux选择编辑器问题

第一次使用crontab 时,会出现

no crontab for root - using an empty one
“Select a editor ......”下面有几个选项,就是叫你选择编辑器。(选vim)就可以了,我选的第三个。
但是如果你选错了,就可能会遇到点麻烦,没有办法正常编辑,crontab -e。 怎么办?
执行这个命令:select-editor (针对crontab的一个命令), 可以让你重新选一次。

crontab: "/usr/bin/sensible-editor" exited with status 1

root@ip82:/home/user# 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]: 3

root@ip82:/home/user# crontab -e
no crontab for root - using an empty one

设置crontab时,可能会操作的

设置默认编辑模式 vim /etc/profile 增加EXPORT EDITOR=vim
VIM /etc/cron.allow, vim /etc/cron.deny

crontab -e结果存放在/var/spool/cron/crontabs中

 

转载地址:http://atiel.baihongyu.com/

你可能感兴趣的文章
cisco ***笔记
查看>>
执行php程序的时候,报错Allowed memory size of 134217728 bytes exhausted (tried to allocate 83 bytes)...
查看>>
春Phone计划 51cto沙龙上海站
查看>>
HDFS体系结构详解
查看>>
我的友情链接
查看>>
[转]我对CTO的理解
查看>>
RH413-Linux系统下umask测试
查看>>
MYSQLmy-innodb-heavy-4G.cnf配置文件注解
查看>>
HTML5 Audio/Video 标签,属性,方法,事件汇总
查看>>
Android 学习笔记【基础扫盲篇】
查看>>
shiro filter
查看>>
重新排列数字使其刚好比当前值大 Next Greater Element III
查看>>
tomcat虚拟子目录设置
查看>>
C++中sizeof详解
查看>>
elasticsearch集群部署
查看>>
我的友情链接
查看>>
Exchange 2010 OWA更改过期密码
查看>>
我的友情链接
查看>>
Programming in Scala (Second Edition) 读书笔记12 Trais
查看>>
国内首家VR虚拟现实主题公园即将在北京推出
查看>>