Why curl allows you to use file url scheme but not wget

This question relates to curl 7.21.4 and GNU Wget 1.13.4, I don’t know if the answer matches the specific versions.

Using 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 to use the same with wget , I get an error message:

 $ wget file://localhost/Users/dave/.vimrc file://localhost/Users/dave/.vimrc: Unsupported scheme `file' 

Does anyone know why this is so?

+6
source share
2 answers

Because Wget was not written to support files: // URL. (This front webpage clearly states: β€œGNU Wget is a free software package for extracting files using HTTP, HTTPS and FTP”)

Let me point out a little curl vs wget .

+6
source

wget only supports HTTP, HTTPS and FTP.

+1
source

Source: https://habr.com/ru/post/914854/


All Articles