在本教程中,我们学习如何安装 libconfig-crontab-perl Ubuntu 18.04。 libconfig-crontab-perl 是读取/写入与 Vixie 兼容的 crontab(5) 文件的模块
介绍
在本教程中我们学习如何安装 libconfig-crontab-perl
在 Ubuntu 18.04。
什么是 libconfig-crontab-perl
libconfig-crontab-perl 是:
Config::Crontab 为 Perl 的 Vixie 风格 crontab(5) 文件提供面向对象的接口。
简而言之,Config::Crontab 使用对象读取和写入 crontab(5) 文件(并且还进行了一些漂亮的打印)。 总体思路是创建一个 Config::Crontab 对象并将其与一个文件关联(如果未关联,它将通过管道工作到 crontab -l)。 从那里,您可以将行添加到 crontab 对象,更改现有行属性,并将所有内容写回文件。
有三种安装方法 libconfig-crontab-perl
在 Ubuntu 18.04。 我们可以用 apt-get
, apt
和 aptitude
。 在以下部分中,我们将描述每种方法。 您可以选择其中之一。
使用 apt-get 安装 libconfig-crontab-perl
更新 apt 数据库 apt-get
使用以下命令。
更新apt数据库后,我们可以安装 libconfig-crontab-perl
使用 apt-get
通过运行以下命令:
sudo apt-get -y install libconfig-crontab-perl
使用 apt 安装 libconfig-crontab-perl
更新 apt 数据库 apt
使用以下命令。
更新apt数据库后,我们可以安装 libconfig-crontab-perl
使用 apt
通过运行以下命令:
sudo apt -y install libconfig-crontab-perl
使用 aptitude 安装 libconfig-crontab-perl
如果您想遵循此方法,您可能需要先安装 aptitude,因为 aptitude 通常不会默认安装 Ubuntu。 更新 apt 数据库 aptitude
使用以下命令。
更新apt数据库后,我们可以安装 libconfig-crontab-perl
使用 aptitude
通过运行以下命令:
sudo aptitude -y install libconfig-crontab-perl
如何卸载 libconfig-crontab-perl Ubuntu 18.04
仅卸载 libconfig-crontab-perl
打包我们可以使用以下命令:
sudo apt-get remove libconfig-crontab-perl
卸载 libconfig-crontab-perl 及其依赖项
卸载 libconfig-crontab-perl
及其不再需要的依赖项 Ubuntu 18.04,我们可以使用以下命令:
sudo apt-get -y autoremove libconfig-crontab-perl
删除 libconfig-crontab-perl 配置和数据
去除 libconfig-crontab-perl
配置和数据来自 Ubuntu 18.04我们可以使用以下命令:
sudo apt-get -y purge libconfig-crontab-perl
删除 libconfig-crontab-perl 配置、数据及其所有依赖项
我们可以使用下面的命令来删除 libconfig-crontab-perl
配置、数据及其所有依赖项,我们可以使用以下命令:
sudo apt-get -y autoremove --purge libconfig-crontab-perl
参考
概括
在本教程中我们学习如何安装 libconfig-crontab-perl
封装在 Ubuntu 18.04 使用不同的包管理工具: apt
, apt-get
和 aptitude
。