Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
lixia625
V2EX  ›  Linux

wget -N 这样的操作是怎么实现的?

  •  
  •   lixia625 · Aug 28, 2014 · 3725 views
    This topic created in 4324 days ago, the information mentioned may be changed or developed.
    其实我想问的就是,所谓文件是不是最新的,是基于什么判断的?文件完全一样就是最新?
    3 replies    2014-08-29 13:46:29 +08:00
    mind3x
        1
    mind3x  
       Aug 28, 2014   ❤️ 1
    看RFC,送HEAD请求,再根据各种和最近修改时间有关的header来判断 http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
    WKPlus
        2
    WKPlus  
       Aug 28, 2014   ❤️ 1
    "When running Wget with -N, with or without -r or -p, the decision as to whether or not to download a newer copy of a file depends on the local and remote timestamp and size of the file. -nc may not be specified at the same time as -N."
    man里面的解释是根据timestamp和size.
    lixia625
        3
    lixia625  
    OP
       Aug 29, 2014
    @WKPlus 话说时间戳又是怎么一回事,任何网页都有的?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   912 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 20:17 · PVG 04:17 · LAX 13:17 · JFK 16:17
    ♥ Do have faith in what you're doing.