I was trying to download file from link http://ligman.me/VSpodw using wget. but it saving the file name as VSpodw as last characters of url . but when i download same file with browser it changes its name to the file specific. So how to do this file working with wget. How to save file with that original name rather than this random string.


You have two options:

use wget with the name of the file:

wget http://ligman.me/eBook-Start-working-in-CRM.pdf


wget --content-disposition 'http://ligman.me/VSpodw'

  • Thanx man wget --content-dispotion 'url' works exactly what i want . U saved my day – deepak Jul 21 '17 at 7:38

You can use the -O option:

wget http://some/url -O some.file

Caution: if your wget command downloads several files, they will be concatenated if the file you specify.

  • I dont know the name of file . It gets automatic when its redirect in browser. but with wget* it postfix from url and save it as a name of file – deepak Jul 21 '17 at 7:40

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.