pavement

Fetch

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
m (fetch is not a port, it's part of the base system.)
m (Reverted edits by 190.3.28.120 (Talk); changed back to last version by Jimbo)
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[fetch]] is used to ....wait for it...fetch files from a URL. The man page will give you all the details you won't want to know about if you don't need to do weird scripting stuff with [[fetch]], but there's a few that might be good to know off the bat:
+
[[fetch]] is used to ....wait for it...fetch files from an URL, either by http or ftp. The man page will give you all the details you won't want to know about if you don't need to do weird scripting stuff with [[fetch]], but there's a few that might be good to know off the bat:
 
  -a retry after soft failures
 
  -a retry after soft failures
 
  -r restart previously interrupted transfer
 
  -r restart previously interrupted transfer
Line 6: Line 6:
 
  -p passive FTP
 
  -p passive FTP
 
  -d direct connect; ignore proxy even if configured
 
  -d direct connect; ignore proxy even if configured
 +
-f specify local filename
 +
 +
Typically, you'll want to specify the protocol in the URL itself - for example
 +
ph34r# '''fetch <nowiki>http://www.freebsdwiki.net/index.php\?title=Fetch -f ./Fetch.html</nowiki>'''
 +
to grab a copy of this page and save it as '''Fetch.html''' in the current directory.
  
 
If you're coming to BSD from the land of Linux, [[fetch]] is very similar to [[wget]].
 
If you're coming to BSD from the land of Linux, [[fetch]] is very similar to [[wget]].

Latest revision as of 13:58, 13 January 2008

fetch is used to ....wait for it...fetch files from an URL, either by http or ftp. The man page will give you all the details you won't want to know about if you don't need to do weird scripting stuff with fetch, but there's a few that might be good to know off the bat:

-a retry after soft failures
-r restart previously interrupted transfer
-F force 
-m mirror -- if the same file (with same size) already exists, don't fetch it
-p passive FTP
-d direct connect; ignore proxy even if configured
-f specify local filename

Typically, you'll want to specify the protocol in the URL itself - for example

ph34r# fetch http://www.freebsdwiki.net/index.php\?title=Fetch -f ./Fetch.html 

to grab a copy of this page and save it as Fetch.html in the current directory.

If you're coming to BSD from the land of Linux, fetch is very similar to wget.

Personal tools