【问题标题】:wget command to browse directory named X with different parent namewget 命令以不同的父名称浏览名为 X 的目录
【发布时间】:2023-03-15 01:13:01
【问题描述】:

我正在使用以下命令:

wget --no-check-certificate -nd -r -l5 --no-parent -A "*revisions.txt" https://mysite.com/folder/test/product1/

获取所有包含“revisions.txt”的文件,但我的结构是这样的:

> https://mysite.com/folder/test/product1/xxx/final/
> https://mysite.com/folder/test/product1/yy/rc/
> https://mysite.com/folder/test/product1/yy/beta/
> https://mysite.com/folder/test/product2/zzz/final/
> https://mysite.com/folder/test/product2/yy/rc/
> https://mysite.com/folder/test/product2/xx/beta/
> https://mysite.com/folder/test/product2/xxx/alpha/
> https://mysite.com/folder/test/product2/zz/alpha/

... 我只想浏览目录“rc”和“final”。问题是我有更多 50 种产品,而且这个数字随着时间的推移而增加,所以这必须是“动态的”。

如何仅浏览 rc 和 final 以从这两个目录中获取所有 revisions.txt?父目录可以有不同的名称。

【问题讨论】:

    标签: command-line wget directory windows-console


    【解决方案1】:

    知道了!

    wget -P ./revisions/ --no-check-certificate -nd -r -l8 -A "*revisions.txt" --exclude-directories="*/BETA/*","*/ALPHA/*" --no-parent https://mysite.com/folder/test/
    

    【讨论】:

      猜你喜欢
      • 2016-07-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-12
      • 2012-10-26
      • 1970-01-01
      • 2013-05-16
      • 2015-04-10
      相关资源
      最近更新 更多