incrontab -e'编辑器完成错误:没有这样的文件或目录'


1

当我尝试添加一个incron条目时,我收到了这个错误。

incrontab -e
editor finished with error: No such file or directory

我究竟做错了什么?

Answers:


1

这特定于它正在尝试运行的编辑器。

tail  /etc/incron.conf

# Parameter:   editor
# Meaning:     editor executable
# Description: This name or path is used to run as an editor for editing
#              user tables.
# Default:     vim
#
# Example:
# editor = nano

因此,如果您尝试运行vim默认编辑器。

vim
-bash: vim: command not found

通过在配置文件中安装vim或设置不同的编辑器来解决此问题。

yum install vim

要么

echo "editor = /usr/bin/vi" >> /etc/incron.conf
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.