【问题标题】:disable crontab auto generate file in home directory禁用 crontab 在主目录中自动生成文件
【发布时间】:2014-05-04 18:56:24
【问题描述】:

我有一个 cron 任务

*/5 * * * * wget --post-data="pass=1123&Type=111" http://test.biz/index.php/game_line

由我的帐户触发

我看到很多空内容文件位于我的主目录中 game_line.1 game_line.100 game_line.1000 ....

这些是干什么用的?以及如何关闭此文件的生成?

感谢您的宝贵时间。

【问题讨论】:

    标签: php cron wget


    【解决方案1】:

    这些文件是您使用 wget 命令下载的。 wget 查询 url 并将响应保存为文件。你问它。如果像 cron 作业中的典型用法一样,您对响应感兴趣,则必须告诉系统忽略响应,将其丢弃:

    */5 * * * * wget --post-data="pass=1123&Type=111" http://test.biz/index.php/game_line 2>&1 1>/dev/null
    

    【讨论】:

      猜你喜欢
      • 2011-10-25
      • 1970-01-01
      • 1970-01-01
      • 2017-02-10
      • 1970-01-01
      • 1970-01-01
      • 2013-12-16
      • 2016-03-28
      • 1970-01-01
      相关资源
      最近更新 更多