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 と呼ばれていました)