xref: /freebsd/usr.bin/fetch/fetch.1 (revision 1453595f49c6b0d580bb57146a5981e73e80130e)
1b39628e7SDag-Erling Smørgrav.\"-
2cb67f01dSDag-Erling Smørgrav.\" Copyright (c) 2000-2013 Dag-Erling Smørgrav
3cb67f01dSDag-Erling Smørgrav.\" Copyright (c) 2013 Michael Gmelin <freebsd@grem.de>
4b39628e7SDag-Erling Smørgrav.\" All rights reserved.
5114c3c1aSDag-Erling Smørgrav.\" Portions Copyright (c) 1999 Massachusetts Institute of Technology; used
6114c3c1aSDag-Erling Smørgrav.\" by permission.
7b39628e7SDag-Erling Smørgrav.\"
8b39628e7SDag-Erling Smørgrav.\" Redistribution and use in source and binary forms, with or without
9b39628e7SDag-Erling Smørgrav.\" modification, are permitted provided that the following conditions
10b39628e7SDag-Erling Smørgrav.\" are met:
11b39628e7SDag-Erling Smørgrav.\" 1. Redistributions of source code must retain the above copyright
12b39628e7SDag-Erling Smørgrav.\"    notice, this list of conditions and the following disclaimer
13b39628e7SDag-Erling Smørgrav.\"    in this position and unchanged.
14b39628e7SDag-Erling Smørgrav.\" 2. Redistributions in binary form must reproduce the above copyright
15b39628e7SDag-Erling Smørgrav.\"    notice, this list of conditions and the following disclaimer in the
16b39628e7SDag-Erling Smørgrav.\"    documentation and/or other materials provided with the distribution.
17b39628e7SDag-Erling Smørgrav.\" 3. The name of the author may not be used to endorse or promote products
18b39628e7SDag-Erling Smørgrav.\"    derived from this software without specific prior written permission.
19b39628e7SDag-Erling Smørgrav.\"
20b39628e7SDag-Erling Smørgrav.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21b39628e7SDag-Erling Smørgrav.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22b39628e7SDag-Erling Smørgrav.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23b39628e7SDag-Erling Smørgrav.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24b39628e7SDag-Erling Smørgrav.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25b39628e7SDag-Erling Smørgrav.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26b39628e7SDag-Erling Smørgrav.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27b39628e7SDag-Erling Smørgrav.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28b39628e7SDag-Erling Smørgrav.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29b39628e7SDag-Erling Smørgrav.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30b39628e7SDag-Erling Smørgrav.\"
31c3aac50fSPeter Wemm.\" $FreeBSD$
32b39628e7SDag-Erling Smørgrav.\"
33*1453595fSDag-Erling Smørgrav.Dd July 30, 2013
347fefc698SJordan K. Hubbard.Dt FETCH 1
35b39628e7SDag-Erling Smørgrav.Os
367fefc698SJordan K. Hubbard.Sh NAME
377fefc698SJordan K. Hubbard.Nm fetch
387fefc698SJordan K. Hubbard.Nd retrieve a file by Uniform Resource Locator
397fefc698SJordan K. Hubbard.Sh SYNOPSIS
40b39628e7SDag-Erling Smørgrav.Nm
41e801aa48SRuslan Ermilov.Op Fl 146AadFlMmnPpqRrsUv
42dcd47379SDag-Erling Smørgrav.Op Fl -allow-sslv2
43b39628e7SDag-Erling Smørgrav.Op Fl B Ar bytes
44dcd47379SDag-Erling Smørgrav.Op Fl -bind-address= Ns Ar host
45dcd47379SDag-Erling Smørgrav.Op Fl -ca-cert= Ns Ar file
46dcd47379SDag-Erling Smørgrav.Op Fl -ca-path= Ns Ar dir
47dcd47379SDag-Erling Smørgrav.Op Fl -cert= Ns Ar file
48dcd47379SDag-Erling Smørgrav.Op Fl -crl= Ns Ar file
497f92799fSMurray Stokely.Op Fl i Ar file
50dcd47379SDag-Erling Smørgrav.Op Fl -key= Ns Ar file
517dcb0a0eSDag-Erling Smørgrav.Op Fl N Ar file
52dcd47379SDag-Erling Smørgrav.Op Fl -no-passive
53dcd47379SDag-Erling Smørgrav.Op Fl -no-proxy= Ns Ar list
54dcd47379SDag-Erling Smørgrav.Op Fl -no-sslv3
55dcd47379SDag-Erling Smørgrav.Op Fl -no-tlsv1
56dcd47379SDag-Erling Smørgrav.Op Fl -no-verify-hostname
57dcd47379SDag-Erling Smørgrav.Op Fl -no-verify-peer
587fefc698SJordan K. Hubbard.Op Fl o Ar file
59dcd47379SDag-Erling Smørgrav.Op Fl -referer= Ns Ar URL
60e801aa48SRuslan Ermilov.Op Fl S Ar bytes
61e801aa48SRuslan Ermilov.Op Fl T Ar seconds
62dcd47379SDag-Erling Smørgrav.Op Fl -user-agent= Ns Ar agent-string
63b39628e7SDag-Erling Smørgrav.Op Fl w Ar seconds
64e801aa48SRuslan Ermilov.Ar URL ...
65e801aa48SRuslan Ermilov.Nm
66e801aa48SRuslan Ermilov.Op Fl 146AadFlMmnPpqRrsUv
67e801aa48SRuslan Ermilov.Op Fl B Ar bytes
68dcd47379SDag-Erling Smørgrav.Op Fl -bind-address= Ns Ar host
69dcd47379SDag-Erling Smørgrav.Op Fl -ca-cert= Ns Ar file
70dcd47379SDag-Erling Smørgrav.Op Fl -ca-path= Ns Ar dir
71dcd47379SDag-Erling Smørgrav.Op Fl -cert= Ns Ar file
72dcd47379SDag-Erling Smørgrav.Op Fl -crl= Ns Ar file
737f92799fSMurray Stokely.Op Fl i Ar file
74dcd47379SDag-Erling Smørgrav.Op Fl -key= Ns Ar file
75e801aa48SRuslan Ermilov.Op Fl N Ar file
76dcd47379SDag-Erling Smørgrav.Op Fl -no-passive
77dcd47379SDag-Erling Smørgrav.Op Fl -no-proxy= Ns Ar list
78dcd47379SDag-Erling Smørgrav.Op Fl -no-sslv3
79dcd47379SDag-Erling Smørgrav.Op Fl -no-tlsv1
80dcd47379SDag-Erling Smørgrav.Op Fl -no-verify-hostname
81dcd47379SDag-Erling Smørgrav.Op Fl -no-verify-peer
82e801aa48SRuslan Ermilov.Op Fl o Ar file
83dcd47379SDag-Erling Smørgrav.Op Fl -referer= Ns Ar URL
84e801aa48SRuslan Ermilov.Op Fl S Ar bytes
85e801aa48SRuslan Ermilov.Op Fl T Ar seconds
86dcd47379SDag-Erling Smørgrav.Op Fl -user-agent= Ns Ar agent-string
87e801aa48SRuslan Ermilov.Op Fl w Ar seconds
88e801aa48SRuslan Ermilov.Fl h Ar host Fl f Ar file Oo Fl c Ar dir Oc
897fefc698SJordan K. Hubbard.Sh DESCRIPTION
903898680cSPhilippe CharnierThe
913898680cSPhilippe Charnier.Nm
923898680cSPhilippe Charnierutility provides a command-line interface to the
93b39628e7SDag-Erling Smørgrav.Xr fetch 3
94b39628e7SDag-Erling Smørgravlibrary.
95b39628e7SDag-Erling SmørgravIts purpose is to retrieve the file(s) pointed to by the URL(s) on the
96b39628e7SDag-Erling Smørgravcommand line.
977fefc698SJordan K. Hubbard.Pp
987fefc698SJordan K. HubbardThe following options are available:
9976dafb89SGarrett Wollman.Bl -tag -width Fl
100dcd47379SDag-Erling Smørgrav.It Fl 1 , -one-file
101b39628e7SDag-Erling SmørgravStop and return exit code 0 at the first successfully retrieved file.
102dcd47379SDag-Erling Smørgrav.It Fl 4 , -ipv4-only
103b39628e7SDag-Erling SmørgravForces
104b39628e7SDag-Erling Smørgrav.Nm
105b39628e7SDag-Erling Smørgravto use IPv4 addresses only.
106dcd47379SDag-Erling Smørgrav.It Fl 6 , -ipv6-only
107b39628e7SDag-Erling SmørgravForces
108b39628e7SDag-Erling Smørgrav.Nm
109b39628e7SDag-Erling Smørgravto use IPv6 addresses only.
110dcd47379SDag-Erling Smørgrav.It Fl A , -no-redirect
111b39628e7SDag-Erling SmørgravDo not automatically follow ``temporary'' (302) redirects.
112b39628e7SDag-Erling SmørgravSome broken Web sites will return a redirect instead of a not-found
113b39628e7SDag-Erling Smørgraverror when the requested object does not exist.
114dcd47379SDag-Erling Smørgrav.It Fl a , -retry
1152494e810SGarrett WollmanAutomatically retry the transfer upon soft failures.
116dcd47379SDag-Erling Smørgrav.It Fl -allow-sslv2
117dcd47379SDag-Erling Smørgrav[SSL]
118dcd47379SDag-Erling SmørgravAllow SSL version 2 when negotiating the connection.
119dcd47379SDag-Erling Smørgrav.It Fl B Ar bytes , Fl -buffer-size= Ns Ar bytes
120b39628e7SDag-Erling SmørgravSpecify the read buffer size in bytes.
121b39628e7SDag-Erling SmørgravThe default is 4096 bytes.
122b39628e7SDag-Erling SmørgravAttempts to set a buffer size lower than this will be silently
123b39628e7SDag-Erling Smørgravignored.
124b39628e7SDag-Erling SmørgravThe number of reads actually performed is reported at verbosity level
125b39628e7SDag-Erling Smørgravtwo or higher (see the
126b39628e7SDag-Erling Smørgrav.Fl v
127b39628e7SDag-Erling Smørgravflag).
128dcd47379SDag-Erling Smørgrav.It Fl -bind-address= Ns Ar host
129dcd47379SDag-Erling SmørgravSpecifies a hostname or IP address to which sockets used for outgoing
130dcd47379SDag-Erling Smørgravconnections will be bound.
13178be3199SGarrett Wollman.It Fl c Ar dir
13278be3199SGarrett WollmanThe file to retrieve is in directory
13378be3199SGarrett Wollman.Ar dir
13478be3199SGarrett Wollmanon the remote host.
135047843ddSDag-Erling SmørgravThis option is deprecated and is provided for backward compatibility
136047843ddSDag-Erling Smørgravonly.
137dcd47379SDag-Erling Smørgrav.It Fl -ca-cert= Ns Ar file
138dcd47379SDag-Erling Smørgrav[SSL]
139dcd47379SDag-Erling SmørgravPath to certificate bundle containing trusted CA certificates.
140dcd47379SDag-Erling SmørgravIf not specified,
141dcd47379SDag-Erling Smørgrav.Pa /etc/ssl/cert.pem
142dcd47379SDag-Erling Smørgravis used.
143dcd47379SDag-Erling SmørgravThe file may contain multiple CA certificates. The port
144dcd47379SDag-Erling Smørgrav.Pa security/ca_root_nss
145dcd47379SDag-Erling Smørgravis a common source of a current CA bundle.
146dcd47379SDag-Erling Smørgrav.It Fl -ca-path= Ns Ar dir
147dcd47379SDag-Erling Smørgrav[SSL]
148dcd47379SDag-Erling SmørgravThe directory
149dcd47379SDag-Erling Smørgrav.Ar dir
150dcd47379SDag-Erling Smørgravcontains trusted CA hashes.
151dcd47379SDag-Erling Smørgrav.It Fl -cert= Ns Ar file
152dcd47379SDag-Erling Smørgrav[SSL]
153dcd47379SDag-Erling Smørgrav.Ar file
154dcd47379SDag-Erling Smørgravis a PEM encoded client certificate/key which will be used in
155dcd47379SDag-Erling Smørgravclient certificate authentication.
156dcd47379SDag-Erling Smørgrav.It Fl -crl= Ns Ar file
157dcd47379SDag-Erling Smørgrav[SSL]
158dcd47379SDag-Erling SmørgravPoints to certificate revocation list
159dcd47379SDag-Erling Smørgrav.Ar file ,
160dcd47379SDag-Erling Smørgravwhich has to be in PEM format and may contain peer certificates that have
161dcd47379SDag-Erling Smørgravbeen revoked.
162dcd47379SDag-Erling Smørgrav.It Fl d , -direct
163047843ddSDag-Erling SmørgravUse a direct connection even if a proxy is configured.
164dcd47379SDag-Erling Smørgrav.It Fl F , -force-restart
165b39628e7SDag-Erling SmørgravIn combination with the
166d6a8296aSBrian Feldman.Fl r
167b39628e7SDag-Erling Smørgravflag, forces a restart even if the local and remote files have
168b39628e7SDag-Erling Smørgravdifferent modification times.
1691bbb80b6SDag-Erling SmørgravImplies
1701bbb80b6SDag-Erling Smørgrav.Fl R .
17178be3199SGarrett Wollman.It Fl f Ar file
17278be3199SGarrett WollmanThe file to retrieve is named
17378be3199SGarrett Wollman.Ar file
17478be3199SGarrett Wollmanon the remote host.
175047843ddSDag-Erling SmørgravThis option is deprecated and is provided for backward compatibility
176047843ddSDag-Erling Smørgravonly.
17778be3199SGarrett Wollman.It Fl h Ar host
17878be3199SGarrett WollmanThe file to retrieve is located on the host
17978be3199SGarrett Wollman.Ar host .
180047843ddSDag-Erling SmørgravThis option is deprecated and is provided for backward compatibility
181047843ddSDag-Erling Smørgravonly.
182dcd47379SDag-Erling Smørgrav.It Fl i Ar file , Fl -if-modified-since= Ns Ar file
1837f92799fSMurray StokelyIf-Modified-Since mode: the remote file will only be retrieved if it
1847f92799fSMurray Stokelyis newer than
1857f92799fSMurray Stokely.Ar file
1867f92799fSMurray Stokelyon the local host.
1877f92799fSMurray Stokely(HTTP only)
188dcd47379SDag-Erling Smørgrav.It Fl -key= Ns Ar file
189dcd47379SDag-Erling Smørgrav[SSL]
190dcd47379SDag-Erling Smørgrav.Ar file
191dcd47379SDag-Erling Smørgravis a PEM encoded client key that will be used in client certificate
192dcd47379SDag-Erling Smørgravauthentication in case key and client certificate are stored separately.
193dcd47379SDag-Erling Smørgrav.It Fl l , -symlink
194b39628e7SDag-Erling SmørgravIf the target is a file-scheme URL, make a symbolic link to the target
195b39628e7SDag-Erling Smørgravrather than trying to copy it.
1967fefc698SJordan K. Hubbard.It Fl M
197dcd47379SDag-Erling Smørgrav.It Fl m , -mirror
1980b474bc6SDag-Erling SmørgravMirror mode: if the file already exists locally and has the same size
1990b474bc6SDag-Erling Smørgravand modification time as the remote file, it will not be fetched.
200c0b0d54eSDag-Erling SmørgravNote that the
201c0b0d54eSDag-Erling Smørgrav.Fl m
202c0b0d54eSDag-Erling Smørgravand
203c0b0d54eSDag-Erling Smørgrav.Fl r
204c0b0d54eSDag-Erling Smørgravflags are mutually exclusive.
205dcd47379SDag-Erling Smørgrav.It Fl N Ar file , Fl -netrc= Ns Ar file
2067dcb0a0eSDag-Erling SmørgravUse
2077dcb0a0eSDag-Erling Smørgrav.Ar file
2087dcb0a0eSDag-Erling Smørgravinstead of
2097dcb0a0eSDag-Erling Smørgrav.Pa ~/.netrc
2107dcb0a0eSDag-Erling Smørgravto look up login names and passwords for FTP sites.
2117dcb0a0eSDag-Erling SmørgravSee
2127dcb0a0eSDag-Erling Smørgrav.Xr ftp 1
2137dcb0a0eSDag-Erling Smørgravfor a description of the file format.
2147dcb0a0eSDag-Erling SmørgravThis feature is experimental.
215dcd47379SDag-Erling Smørgrav.It Fl n , -no-mtime
2160227791bSRuslan ErmilovDo not preserve the modification time of the transferred file.
217dcd47379SDag-Erling Smørgrav.It Fl -no-passive
218dcd47379SDag-Erling SmørgravForces the FTP code to use active mode.
219dcd47379SDag-Erling Smørgrav.It Fl -no-proxy= Ns Ar list
220dcd47379SDag-Erling SmørgravEither a single asterisk, which disables the use of proxies
221dcd47379SDag-Erling Smørgravaltogether, or a comma- or whitespace-separated list of hosts for
222dcd47379SDag-Erling Smørgravwhich proxies should not be used.
223dcd47379SDag-Erling Smørgrav.It Fl -no-sslv3
224dcd47379SDag-Erling Smørgrav[SSL]
225dcd47379SDag-Erling SmørgravDon't allow SSL version 3 when negotiating the connection.
226dcd47379SDag-Erling Smørgrav.It Fl -no-tlsv1
227dcd47379SDag-Erling Smørgrav[SSL]
228dcd47379SDag-Erling SmørgravDon't allow TLS version 1 when negotiating the connection.
229dcd47379SDag-Erling Smørgrav.It Fl -no-verify-hostname
230dcd47379SDag-Erling Smørgrav[SSL]
231dcd47379SDag-Erling SmørgravDo not verify that the hostname matches the subject of the
232dcd47379SDag-Erling Smørgravcertificate presented by the server.
233dcd47379SDag-Erling Smørgrav.It Fl -no-verify-peer
234dcd47379SDag-Erling Smørgrav[SSL]
235dcd47379SDag-Erling SmørgravDo not verify the peer certificate against trusted CAs.
236dcd47379SDag-Erling Smørgrav.It Fl o Ar file , Fl output= Ns Ar file
23778be3199SGarrett WollmanSet the output file name to
23878be3199SGarrett Wollman.Ar file .
23978be3199SGarrett WollmanBy default, a ``pathname'' is extracted from the specified URI, and
240b39628e7SDag-Erling Smørgravits basename is used as the name of the output file.
241b39628e7SDag-Erling SmørgravA
24278be3199SGarrett Wollman.Ar file
24378be3199SGarrett Wollmanargument of
24478be3199SGarrett Wollman.Sq Li \&-
24578be3199SGarrett Wollmanindicates that results are to be directed to the standard output.
246fe6a0485SColin PercivalIf the
247fe6a0485SColin Percival.Ar file
248fe6a0485SColin Percivalargument is a directory, fetched file(s) will be placed within the
249fe6a0485SColin Percivaldirectory, with name(s) selected as in the default behaviour.
2507fefc698SJordan K. Hubbard.It Fl P
251dcd47379SDag-Erling Smørgrav.It Fl p , -passive
252b39628e7SDag-Erling SmørgravUse passive FTP.
253bb6e3329SDag-Erling SmørgravThese flags have no effect, since passive FTP is the default, but are
254bb6e3329SDag-Erling Smørgravprovided for compatibility with earlier versions where active FTP was
255bb6e3329SDag-Erling Smørgravthe default.
256dcd47379SDag-Erling SmørgravTo force active mode, use the
257dcd47379SDag-Erling Smørgrav.Fl -no-passive
258dcd47379SDag-Erling Smørgravflag or set the
259bb6e3329SDag-Erling Smørgrav.Ev FTP_PASSIVE_MODE
260bb6e3329SDag-Erling Smørgravenvironment variable to
261bb6e3329SDag-Erling Smørgrav.Ql NO .
262dcd47379SDag-Erling Smørgrav.It Fl -referer= Ns Ar URL
263dcd47379SDag-Erling SmørgravSpecifies the referrer URL to use for HTTP requests.
264dcd47379SDag-Erling SmørgravIf
265dcd47379SDag-Erling Smørgrav.Ar URL
266dcd47379SDag-Erling Smørgravis set to
267dcd47379SDag-Erling Smørgrav.Dq auto ,
268dcd47379SDag-Erling Smørgravthe document URL will be used as referrer URL.
269dcd47379SDag-Erling Smørgrav.It Fl q , -quiet
27087faa07bSSheldon HearnQuiet mode.
271dcd47379SDag-Erling Smørgrav.It Fl R , -keep-output
272b39628e7SDag-Erling SmørgravThe output files are precious, and should not be deleted under any
273b39628e7SDag-Erling Smørgravcircumstances, even if the transfer failed or was incomplete.
274dcd47379SDag-Erling Smørgrav.It Fl r , -restart
27578be3199SGarrett WollmanRestart a previously interrupted transfer.
276c0b0d54eSDag-Erling SmørgravNote that the
277c0b0d54eSDag-Erling Smørgrav.Fl m
278c0b0d54eSDag-Erling Smørgravand
279c0b0d54eSDag-Erling Smørgrav.Fl r
280c0b0d54eSDag-Erling Smørgravflags are mutually exclusive.
281dcd47379SDag-Erling Smørgrav.It Fl S Ar bytes , Fl -require-size= Ns Ar bytes
282b39628e7SDag-Erling SmørgravRequire the file size reported by the server to match the specified
283b39628e7SDag-Erling Smørgravvalue.
284b39628e7SDag-Erling SmørgravIf it does not, a message is printed and the file is not fetched.
285b39628e7SDag-Erling SmørgravIf the server does not support reporting file sizes, this option is
286b39628e7SDag-Erling Smørgravignored and the file is fetched unconditionally.
287dcd47379SDag-Erling Smørgrav.It Fl s , -print-size
288b39628e7SDag-Erling SmørgravPrint the size in bytes of each requested file, without fetching it.
289dcd47379SDag-Erling Smørgrav.It Fl T Ar seconds , Fl -timeout= Ns Ar seconds
290fc6fcbf9SJordan K. HubbardSet timeout value to
291fc6fcbf9SJordan K. Hubbard.Ar seconds .
292a43a248cSPeter WemmOverrides the environment variables
293fc6fcbf9SJordan K. Hubbard.Ev FTP_TIMEOUT
294b39628e7SDag-Erling Smørgravfor FTP transfers or
295a43a248cSPeter Wemm.Ev HTTP_TIMEOUT
296b39628e7SDag-Erling Smørgravfor HTTP transfers if set.
297dcd47379SDag-Erling Smørgrav.It Fl U , -passive-portrange-default
2987c480c6cSDag-Erling SmørgravWhen using passive FTP, allocate the port for the data connection from
2997c480c6cSDag-Erling Smørgravthe low (default) port range.
3007c480c6cSDag-Erling SmørgravSee
3017c480c6cSDag-Erling Smørgrav.Xr ip 4
3027c480c6cSDag-Erling Smørgravfor details on how to specify which port range this corresponds to.
303dcd47379SDag-Erling Smørgrav.It Fl -user-agent= Ns Ar agent-string
304dcd47379SDag-Erling SmørgravSpecifies the User-Agent string to use for HTTP requests.
305dcd47379SDag-Erling SmørgravThis can be useful when working with HTTP origin or proxy servers that
306dcd47379SDag-Erling Smørgravdifferentiate between user agents.
307dcd47379SDag-Erling Smørgrav.It Fl v , -verbose
30838a616e4SDag-Erling SmørgravIncrease verbosity level.
309dcd47379SDag-Erling Smørgrav.It Fl w Ar seconds , Fl -retry-delay= Ns Ar seconds
310b39628e7SDag-Erling SmørgravWhen the
311b39628e7SDag-Erling Smørgrav.Fl a
312b39628e7SDag-Erling Smørgravflag is specified, wait this many seconds between successive retries.
3137fefc698SJordan K. Hubbard.El
314ab47d799SRuslan Ermilov.Pp
315ab47d799SRuslan ErmilovIf
316ab47d799SRuslan Ermilov.Nm
317ab47d799SRuslan Ermilovreceives a
318ab47d799SRuslan Ermilov.Dv SIGINFO
319ab47d799SRuslan Ermilovsignal (see the
320ab47d799SRuslan Ermilov.Cm status
321ab47d799SRuslan Ermilovargument for
322ab47d799SRuslan Ermilov.Xr stty 1 ) ,
323ab47d799SRuslan Ermilovthe current transfer rate statistics will be written to the
324ab47d799SRuslan Ermilovstandard error output, in the same format as the standard completion
325ab47d799SRuslan Ermilovmessage.
3267fefc698SJordan K. Hubbard.Sh ENVIRONMENT
32709d2d42eSWes Peters.Bl -tag -width HTTP_TIMEOUT
32809d2d42eSWes Peters.It Ev FTP_TIMEOUT
3290fc781ffSDag-Erling SmørgravMaximum time, in seconds, to wait before aborting an FTP connection.
33009d2d42eSWes Peters.It Ev HTTP_TIMEOUT
3310fc781ffSDag-Erling SmørgravMaximum time, in seconds, to wait before aborting an HTTP connection.
332cec5287bSWes Peters.El
33309d2d42eSWes Peters.Pp
3340fc781ffSDag-Erling SmørgravSee
33509d2d42eSWes Peters.Xr fetch 3
3360fc781ffSDag-Erling Smørgravfor a description of additional environment variables, including
3370fc781ffSDag-Erling Smørgrav.Ev FETCH_BIND_ADDRESS ,
3380fc781ffSDag-Erling Smørgrav.Ev FTP_LOGIN ,
3390fc781ffSDag-Erling Smørgrav.Ev FTP_PASSIVE_MODE ,
3400fc781ffSDag-Erling Smørgrav.Ev FTP_PASSWORD ,
3410fc781ffSDag-Erling Smørgrav.Ev FTP_PROXY ,
3420fc781ffSDag-Erling Smørgrav.Ev ftp_proxy ,
343*1453595fSDag-Erling Smørgrav.Ev HTTP_ACCEPT ,
3440fc781ffSDag-Erling Smørgrav.Ev HTTP_AUTH ,
3450fc781ffSDag-Erling Smørgrav.Ev HTTP_PROXY ,
3460fc781ffSDag-Erling Smørgrav.Ev http_proxy ,
3470fc781ffSDag-Erling Smørgrav.Ev HTTP_PROXY_AUTH ,
3480fc781ffSDag-Erling Smørgrav.Ev HTTP_REFERER ,
3490fc781ffSDag-Erling Smørgrav.Ev HTTP_USER_AGENT ,
3500fc781ffSDag-Erling Smørgrav.Ev NETRC ,
351dcd47379SDag-Erling Smørgrav.Ev NO_PROXY ,
352dcd47379SDag-Erling Smørgrav.Ev no_proxy ,
353dcd47379SDag-Erling Smørgrav.Ev SSL_ALLOW_SSL2 ,
354dcd47379SDag-Erling Smørgrav.Ev SSL_CA_CERT_FILE ,
355dcd47379SDag-Erling Smørgrav.Ev SSL_CA_CERT_PATH ,
356dcd47379SDag-Erling Smørgrav.Ev SSL_CLIENT_CERT_FILE ,
357dcd47379SDag-Erling Smørgrav.Ev SSL_CLIENT_KEY_FILE ,
358dcd47379SDag-Erling Smørgrav.Ev SSL_CRL_FILE ,
359dcd47379SDag-Erling Smørgrav.Ev SSL_NO_SSL3 ,
360dcd47379SDag-Erling Smørgrav.Ev SSL_NO_TLS1 ,
361dcd47379SDag-Erling Smørgrav.Ev SSL_NO_VERIFY_HOSTNAME
362011a8335SDag-Erling Smørgravand
363dcd47379SDag-Erling Smørgrav.Ev SSL_NO_VERIFY_PEER .
3646c7216dfSRuslan Ermilov.Sh EXIT STATUS
3656c7216dfSRuslan ErmilovThe
3666c7216dfSRuslan Ermilov.Nm
3676c7216dfSRuslan Ermilovcommand returns zero on success, or one on failure.
3686c7216dfSRuslan ErmilovIf multiple URLs are listed on the command line,
3696c7216dfSRuslan Ermilov.Nm
370ee8e4b36SJoseph Koshywill attempt to retrieve each one of them in turn, and will return
371ee8e4b36SJoseph Koshyzero only if they were all successfully retrieved.
3727f92799fSMurray Stokely.Pp
3737f92799fSMurray StokelyIf the
3747f92799fSMurray Stokely.Fl i
3757f92799fSMurray Stokelyargument is used and the remote file is not newer than the
3767f92799fSMurray Stokelyspecified file then the command will still return success,
3777f92799fSMurray Stokelyalthough no file is transferred.
3787fefc698SJordan K. Hubbard.Sh SEE ALSO
379b39628e7SDag-Erling Smørgrav.Xr fetch 3
3807fefc698SJordan K. Hubbard.Sh HISTORY
3817fefc698SJordan K. HubbardThe
382b39628e7SDag-Erling Smørgrav.Nm
38385cf659aSMike Pritchardcommand appeared in
38485cf659aSMike Pritchard.Fx 2.1.5 .
385b39628e7SDag-Erling SmørgravThis implementation first appeared in
386b39628e7SDag-Erling Smørgrav.Fx 4.1 .
38778be3199SGarrett Wollman.Sh AUTHORS
388f4d874a1SRuslan Ermilov.An -nosplit
38978be3199SGarrett WollmanThe original implementation of
39078be3199SGarrett Wollman.Nm
391306005e7SPhilippe Charnierwas done by
39209e06539SDag-Erling Smørgrav.An Jean-Marc Zucconi Aq jmz@FreeBSD.org .
393306005e7SPhilippe CharnierIt was extensively re-worked for
394bc5d5816SWolfram Schneider.Fx 2.2
395306005e7SPhilippe Charnierby
39609e06539SDag-Erling Smørgrav.An Garrett Wollman Aq wollman@FreeBSD.org ,
397b39628e7SDag-Erling Smørgravand later completely rewritten to use the
398b39628e7SDag-Erling Smørgrav.Xr fetch 3
399b39628e7SDag-Erling Smørgravlibrary by
400dcd47379SDag-Erling Smørgrav.An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org
401dcd47379SDag-Erling Smørgravand
402dcd47379SDag-Erling Smørgrav.An Michael Gmelin Aq freebsd@grem.de .
403b39628e7SDag-Erling Smørgrav.Sh NOTES
4042494e810SGarrett WollmanThe
4050c8cc99eSGarrett Wollman.Fl b
406b39628e7SDag-Erling Smørgravand
407b39628e7SDag-Erling Smørgrav.Fl t
408b39628e7SDag-Erling Smørgravoptions are no longer supported and will generate warnings.
409b39628e7SDag-Erling SmørgravThey were workarounds for bugs in other OSes which this implementation
410b39628e7SDag-Erling Smørgravdoes not trigger.
411c1468430SGarrett Wollman.Pp
412047843ddSDag-Erling SmørgravOne cannot both use the
413047843ddSDag-Erling Smørgrav.Fl h ,
414cf575052SBen Smithurst.Fl c
415cf575052SBen Smithurstand
416b39628e7SDag-Erling Smørgrav.Fl f
417047843ddSDag-Erling Smørgravoptions and specify URLs on the command line.
418