非交互式bash脚本:忽略由您或脚本创建的系统上的文件

时间:2018-04-11 13:34:43

标签: bash

我在安装logstash之前创建了一个配置文件。 当我安装logstash时,我面对:

Configuration file '/etc/logstash/pipelines.yml'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** pipelines.yml (Y/I/N/O/D/Z) [default=N] ? D

我只想保留N (default)选项,但我更喜欢指定它,然后忽略它,因为它是默认的。

我该怎么做?我的命令就是

sudo apt-get install logstash

1 个答案:

答案 0 :(得分:0)

这对我有用:

 $ sudo apt-get -o Dpkg::Options::="--force-confold" -y install logstash