Challenge - 5 Problems
Wget Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
What is the output of this wget command?
You run this command in a terminal:
What will wget do?
wget --spider https://example.com/file.txtWhat will wget do?
Linux CLI
wget --spider https://example.com/file.txt
Attempts:
2 left
💡 Hint
The --spider option makes wget act like a web spider.
✗ Incorrect
The --spider option tells wget to check if the file exists without downloading it. It prints the HTTP status but does not save the file.
💻 Command Output
intermediate2:00remaining
What file name will wget save as?
You run this command:
What will be the name of the saved file?
wget https://example.com/downloads/report.pdfWhat will be the name of the saved file?
Linux CLI
wget https://example.com/downloads/report.pdf
Attempts:
2 left
💡 Hint
wget uses the last part of the URL path as the file name.
✗ Incorrect
wget saves the file using the last part of the URL path, which is 'report.pdf' here.
📝 Syntax
advanced2:00remaining
Which wget command downloads a file and saves it with a custom name?
You want to download https://example.com/data.csv but save it as mydata.csv locally. Which command does this correctly?
Attempts:
2 left
💡 Hint
The -O option sets the output file name.
✗ Incorrect
The -O option followed by a file name tells wget to save the download with that name. The other options are incorrect or mean something else.
💻 Command Output
advanced2:00remaining
What happens if you run wget with the -c option on a partially downloaded file?
You started downloading a large file but stopped halfway. You run:
What will wget do?
wget -c https://example.com/largefile.zipWhat will wget do?
Linux CLI
wget -c https://example.com/largefile.zipAttempts:
2 left
💡 Hint
The -c option means continue.
✗ Incorrect
The -c option tells wget to continue an incomplete download by resuming from where it left off.
🚀 Application
expert3:00remaining
How to download multiple files listed in a text file using wget?
You have a file urls.txt with a list of URLs, one per line. Which wget command downloads all files listed in urls.txt?
Attempts:
2 left
💡 Hint
The -i option tells wget to read URLs from a file.
✗ Incorrect
The -i option followed by a file name tells wget to read URLs from that file and download each one. The other options are invalid or do different things.