You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

wget工具:如何下载特定名称的文件

How to Download Only "FullList"-Containing .gz Files with wget

Hey there! You’ve already got a solid base command going—let’s adjust it to zero in on only the files that include "FullList" in their names.

The key tweak here is refining the -A (accept) parameter to use wildcard matching, which lets you target files with specific strings in their names. Here’s your updated command:

wget -r --no-parent -A "*FullList*.gz" --no-directories -R robots http://www.web.com/some_path/

Breakdown of the change:

  • -A "*FullList*.gz" replaces your original -A.gz. The * wildcards match any sequence of characters (including none), so this tells wget to only accept files that:
    1. End with .gz (like before)
    2. Have "FullList" somewhere in their filename (before the .gz suffix)

All your other existing parameters stay intact:

  • -r keeps recursive downloading to traverse subdirectories under some_path/
  • --no-parent prevents wget from climbing up to parent directories outside your target path
  • --no-directories ensures all downloaded files land in your current working directory (no nested folders created)
  • -R robots skips downloading robots.txt files (note: if you run into issues, you might need to use -R robots.txt explicitly depending on your wget version)

Quick notes:

  • Double-check the case of "FullList"—if the website uses uppercase/lowercase variations (like "fulllist" or "Fulllist"), adjust the string in the command to match exactly.
  • The quotes around "*FullList*.gz" are important to prevent your shell from interpreting the wildcards before wget gets them.

内容的提问来源于stack exchange,提问作者user9269628

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 03:08:42