shell

Retrieving files from a URL (the BSD way)

$fetch URL

This ancient command (it appeared first in FreeBSD 2.1.5) retrieves files from URLs. It is simple and efficient. All its features are encapsulated in the libfetch library which can be accesed from a C program using a predefined API (man 3 fetch).

Example:

$fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/ISO-IMAGES/7.1/7.1-RELEASE-amd64-bootonly.iso

3 Comments

  • On 04.24.09 John Baber said:

    Why use this instead of ‘wget’ or ‘curl’ ?

  • On 04.24.09 Randy said:

    Because fetch is in the base install, and you would have to install wget or curl from ports.

  • On 04.24.09 n0str0m0 said:

    You don’t have to. But this command is included in the base system. This means it is present in every FreeBSD installation. It is also interesting to know that this is used by portsnap to retrieve the source code.

speak up

Add your comment below, or trackback from your own site.

Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*Required Fields