ubuntu:wget:download_and_store_with_a_different_file_name
This is an old revision of the document!
Ubuntu - 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
wget http://www.vim.org/scripts/download_script.php?src_id=7701
Even though the downloaded file is in zip format, it will get stored in the file as shown below.
ls
Displays:
download_script.php?src_id=7701
Correct: To correct this issue, we can specify the output file name using the -O option as:
wget -O taglist.zip http://www.vim.org/scripts/download_script.php?src_id=7701
ubuntu/wget/download_and_store_with_a_different_file_name.1575498998.txt.gz · Last modified: 2020/07/15 09:30 (external edit)