【发布时间】:2012-11-30 15:48:54
【问题描述】:
我最近在 crontab 中看到了这个:
5 * * * * perl /abs/path/to/my/script.pl >> /abs/path/two/my/script-log.txt 2>&1
如果我没看错,它会在每小时 5 分钟后运行 script.pl(如 2:05、3:05、10:05 等)。同样,如果我是正确的,它会将标准输出重定向到位于其他地方的日志文件。
但是 crontab 末尾的这个 Linux/Perl voo-doo 是什么?
2>&1
这是在指示 Linux/Perl 做什么?如果我对 crontab 的上述解释不正确,请也为我澄清!提前致谢!
【问题讨论】:
标签: linux bash crontab io-redirection redirectstandardoutput