User Tools

Site Tools


wget:download_and_store_with_a_different_file_name

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
wget:download_and_store_with_a_different_file_name [2016/07/09 23:00] peterwget: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?src_id=7701 
- 
-<code bash> 
-wget http://www.vim.org/scripts/download_script.php?src_id=7701 
-</code> 
- 
-Even though the downloaded file is in zip format, it will get stored in the file as shown below. 
- 
-<code bash> 
-ls 
-</code> 
- 
-Displays: 
- 
-<code> 
-download_script.php?src_id=7701 
-</code> 
- 
- 
-Correct: To correct this issue, we can specify the output file name using the -O option as: 
- 
-<code bash> 
-wget -O taglist.zip http://www.vim.org/scripts/download_script.php?src_id=7701 
-</code> 
  
wget/download_and_store_with_a_different_file_name.1468105226.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki