【发布时间】:2021-08-23 20:03:00
【问题描述】:
我在 CRONTAB 中定期下载 JSON 文件,该文件总是被截断为相同大小。如果我从 shell 运行相同的脚本,文件总是完整的。 Wget 和 Curl 都以相同的方式截断文件。
我的脚本...
curl "https://opendata.paris.fr/explore/dataset/velib-disponibilite-en-temps-reel/download/?format=json&timezone=Europe/Berlin&lang=fr" >> "/home/jt/public_html/ParisBike/`date -u`.json"
任何想法为什么会这样?我不是服务器上的root用户。
谢谢
【问题讨论】:
-
当你使用 curl 自己的
-o参数作为输出文件名而不是>>重定向时会发生什么? -
当我使用 curl 和 wget 的 -o -O 参数时,结果相同。
标签: linux shell file curl wget