This question refers to curl 7.21.4 and GNU Wget 1.13.4, I don't know if the answer is version specific.
Using the file URI scheme I can get local file using curl
as such
$ curl file://localhost/Users/dave/.vimrc
contents of .vimrc
However if I try the same using wget
I receive an error:
$ wget file://localhost/Users/dave/.vimrc
file://localhost/Users/dave/.vimrc: Unsupported scheme `file'
Does anyone know why this is the case?
Are there any difference between curl and wget? Answer: On a high-level, both wget and curl are command line utilities that do the same thing. They both can be used to download files using FTP and HTTP(s). However curl provides APIs that can be used by programmers inside their own code.
curl, short for "Client for URLs", is a command line tool for transferring data using various protocols. This tool has applications in many household products such as tablets, printers, cars, routers, etc. There are a vast amount of use-cases for curl, such as: FTP upload. Proxy support.
-m, --max-time <seconds> Maximum time in seconds that you allow the whole operation to take.
Because Wget has not been written to support file:// URLs. (It's front web page clearly states "GNU Wget is a free software package for retrieving files using HTTP, HTTPS and FTP")
Allow me to point to a little curl vs wget comparison.
wget
only supports the HTTP, HTTPS, and FTP protocols.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With