在 Ubuntu 上使用 shell 脚本附加到 crontab [英] Appending to crontab with a shell script on Ubuntu

查看:55
本文介绍了在 Ubuntu 上使用 shell 脚本附加到 crontab的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 Ubuntu 的 crontab 中添加一行.

I'm trying to add a line to the crontab on Ubuntu.

现在,我正在执行 crontab -e 并在那里编辑 crontab.

Right now, I'm doing crontab -e and editing the crontab there.

但是,我似乎找不到真正的 crontab 文件,因为 crontab -e 似乎给了你一个临时工作副本.

However, I can't seem to find the real crontab file, since crontab -e seems to give you a temporary working copy.

/etc/crontab 看起来像系统 crontab.

/etc/crontab looks like the system crontab.

crontab -e保存到的crontab的路径是什么?

What is the path of the crontab that crontab -e saves to?

谢谢!

推荐答案

使用crontab -l >file 将当前用户的 crontab 列出到 filecrontab 文件 用于安装新的 crontab.

Use crontab -l > file to list current user's crontab to the file, and crontab file, to install new crontab.

这篇关于在 Ubuntu 上使用 shell 脚本附加到 crontab的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆