Unix Command to Download from URL to Directory

unix

Is there a unix command I can use to pull a file from a URL and put it into a directory of my choice? So I have a URL which if you go to it, a file will be downloaded. I want to be able to type a unix command to download the linked file from the URL I specify and place it into a directory of my choice.

So if the URL www.example.com/image.png. I want to type a unix command to download the image.png file, I want to put that file into my examples/ directory

Is this possible?

Thanks!

Best Answer

wget -P examples/ www.example.com/image.png

and

curl -o examples/image.png www.example.com/image.png

both work.

Related Question