If you’ve used the GNU wget utility, you know that often when wget downloads files, it saves files with odd file names. Sometimes these are long garbled filenames or the name ‘download’.
To get wget to honour the correct filename from the server, the method is to use wget with the –content-disposition flag.
wget https://github.com/i-MSCP/imscp/archive/1.1.11.tar.gz --content-disposition
Unfortunately, –content-disposition does not have an alias, and it becomes easily a chore, typing that repeatedly. Some people create an alias for wget and use:
alias wget='wget --content-disposition'
The more proper method is to set the option in the configuration file in your home directory:
#cat ~/.wgetrc content-disposition = on
Now wget will download files to the correct name.
Joel G Mathew, known in tech circles by the pseudonym Droidzone, is an opensource and programming enthusiast.
His favorite pastime is grappling with GNU compilers, discovering newer Linux secrets, writing scripts, hacking roms, and programs (nothing illegal), reading, blogging. and testing out the latest gadgets.
When away from the tech world, Dr Joel G. Mathew is a practising ENT Surgeon, busy with surgeries and clinical practise.