wget:下载具有特定名称的文件

时间:2018-02-01 13:38:35

标签: bash download

我尝试从每天更新的网站下载文件。 我设法使用以下命令下载所有gz文件:

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

但现在我只想下载具有特定名称的文件,例如 " FullList" 。我该怎么做?

2 个答案:

答案 0 :(得分:1)

以下是wget手册中相关部分的链接:link

底线:使用-A函数后跟字符串,如-A“string *”。

答案 1 :(得分:-1)

import java.util.*; public class Final2 { public static void main(String[] args){ int in = 0; double total_in = 0; int out; int count = 0; int games = 1; int tries; double average = 0; int total = 0; Scanner scan = new Scanner(System.in); System.out.print("Enter Player's Free Throw Percentage: "); int input = scan.nextInt(); do{ System.out.println("\nGame " + games + ":"); games++; for (tries = 0; tries < 10; tries++){ int shot = (int)(Math.random()*100); count++; if (shot < input){ in++; System.out.print("IN "); } else{ System.out.print("OUT "); } } System.out.println("\nFree Throws Made: " + in + " Out Of 10. "); total_in += in; in = 0; } while (games <= 5);{ } average = (total_in / count)*100; System.out.println("\nSummary:"); System.out.println("Best Game Free Throws Made: " + "???"); System.out.println("Worst Game Free Throws Made: " + "???"); System.out.println("Total Free Throws Made: " + String.format("%.0f", total_in) + " Out Of " + count); System.out.println("Average Free Throw Percentage: " + String.format("%.0f", average) + "%"); System.out.println("\nEND OF SIMULATION!"); } } 使用-O选项。示例:

wget