首页 文章

Wget - 覆盖不同的文件

提问于
浏览
0

所以,我'm making an updater for my game using wget. The latest version of the game (with all it'的文件),在我的服务器上 . 问题是我希望wget只将与服务器上的目录不同的文件下载到游戏文件根目录中的 www 文件夹中(这必须是递归的,因为不是所有的游戏's files are stored directly in that folder). So, when the command is being ran it should check to see if the file' s hashsum(如果可能,否则它应该检查服务器上的匹配游戏's files. If it doesn'中的那个,它应该从服务器下载文件并替换游戏中的那个's directory. This way, the player won' t必须重新下载所有游戏的文件 .

这是我用于测试的命令:

wget.exe -N -r ftp://10.42.0.1/gamupd/arpg -O ./www

服务器在我的本地网络上运行,因此我使用该IP地址 . 问题是它没有将 /gamupd/arpg 的内容保存到 www 文件夹,而是似乎复制了 arpg 的目录树 .

1 回答

  • 1

    也许 timestamping 旗帜会让你满意 . 从 wget -help

    -N, - timestamping不会重新检索文件,除非比本地更新

相关问题