开发者

crone tab shell script do not save output

开发者 https://www.devze.com 2022-12-30 18:44 出处:网络
i use cron tab with command wget http://www.mydomain.com/page.php 开发者_高级运维to run one of my pages in server. It works, but problem is output is sved with names

i use cron tab with command

wget http://www.mydomain.com/page.php

开发者_高级运维to run one of my pages in server. It works, but problem is output is sved with names page.php, page.php1, page.php2, page.php3 etc. Can i run the page using wget without sving output


try

wget http://www.mydomain.com/page.php -O /dev/null


wget -O - http://mydomain.com/page.php > /dev/null 2>&1

You need to specify -O - to output to STDOUT, then use > /dev/null to route STDOUT to the null

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号