PDA

View Full Version : [SOLVED] How to download an image from a website using bash?



mferarri
March 17th, 2012, 04:19 AM
Hi UbuntuForums,

How would I download this picture http://www.viemu.com/vi-vim-cheat-sheet.gif using bash?

thanks,:KS

papibe
March 17th, 2012, 04:32 AM
Hi mferarri.

You can use 'wget'. For instance:

wget http://www.viemu.com/vi-vim-cheat-sheet.gif
Hope that helps.
Regards.

andrew.46
March 17th, 2012, 08:39 AM
Or for a variation:



curl -O http://www.viemu.com/vi-vim-cheat-sheet.gif

mferarri
March 17th, 2012, 11:43 PM
thanks everyone for your response. wget works fine for me. so my original question is solved.

2) if i want to get the picture of the beans in my profile (rank2.png) without knowing the url to it how would i get the pic?

andrew.46
March 18th, 2012, 02:12 AM
2) if i want to get the picture of the beans in my profile (rank2.png) without knowing the url to it how would i get the pic?




wget http://ubuntuforums.org/images/rank_2.png

mferarri
March 18th, 2012, 04:42 AM
wget http://ubuntuforums.org/images/rank_2.png


... but what if i dint know that url?... ok solved it myself (you can actually right click on a pic in the browser and select copy url)

thanks guys.

andrew.46
March 18th, 2012, 06:53 AM
ok solved it myself (you can actually right click on a pic in the browser and select copy url)

You found it :)