我正在使用 curl 从 FTPS 站点下载一些文件。当我将文件从站点下载到我的机器时,zip 文件日期更改为下载时间和日期。我想保留 FTPS 服务器上的原始时间戳。请告知如何执行此操作。如果你能提供 gr8 的例子,我是 curl 的新手。
谢谢
关键是这个命令行选项:
-R/--remote-time
When used, this will make libcurl attempt to figure out the
timestamp of the remote file, and if that is available make
the local file get that same timestamp.
...然后可以像这样使用:
curl -R -O --ssl ftp://example.com/that/file/I/want.txt
(--ssl 以前称为--ftp-ssl)