wget:download_and_store_with_a_different_file_name
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
wget:download_and_store_with_a_different_file_name [2016/07/09 23:00] – peter | wget:download_and_store_with_a_different_file_name [2019/12/04 22:36] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== wget - Download and Store With a Different File name ====== | ||
- | |||
- | By default wget will pick the filename from the last word after last forward slash, which may not be appropriate always. | ||
- | |||
- | Wrong: Following example will download and store the file with name: download_script.php? | ||
- | |||
- | <code bash> | ||
- | wget http:// | ||
- | </ | ||
- | |||
- | Even though the downloaded file is in zip format, it will get stored in the file as shown below. | ||
- | |||
- | <code bash> | ||
- | ls | ||
- | </ | ||
- | |||
- | Displays: | ||
- | |||
- | < | ||
- | download_script.php? | ||
- | </ | ||
- | |||
- | |||
- | Correct: To correct this issue, we can specify the output file name using the -O option as: | ||
- | |||
- | <code bash> | ||
- | wget -O taglist.zip http:// | ||
- | </ | ||
wget/download_and_store_with_a_different_file_name.1468105226.txt.gz · Last modified: 2020/07/15 09:30 (external edit)