Tuesday, November 16, 2010

VMware ESX 4 – use cURL to grab files

I've found this information by Eric Gray at http://www.vcritical.com/2009/05/vmware-esx-4-use-curl-to-grab-files/

I need to quickly download an ISO image to my new VMware ESX 4 box and discovered that the cURL utility is now included — pretty handy.

If you have not used cURL, it is similar to wget. However, with no parameters cURL will spew the download to standard out — definitely not what you want in the case of an ISO image. Therefore, the -O option — capital O — can be used to save the downloaded file, preserving the filename. If you happen to be behind a proxy server, don’t forget to set the http_proxy environment variable — standard Linux procedure.
[root@cl-168 Storage1]# export http_proxy=http://proxy:3128
[root@cl-168 Storage1]# curl -O http://mirros.easynews.com/linux/ubuntu-releases/hardy/ubuntu-8.04.2-server-amd64.iso
Also you can connect using ftp protocol as follows:

curl -O ftp://myftpsite.com/filename --user myname:mypassword 

No comments:

Post a Comment