xref: /freebsd/usr.bin/fetch/fetch.1 (revision 43a623c82f6c8a8675c655ce13250a67e0339710)
1b39628e7SDag-Erling Smørgrav.\"-
2c2ea176dSDag-Erling Smørgrav.\" Copyright (c) 2000-2014 Dag-Erling Smørgrav
31ec923fdSMichael Gmelin.\" Copyright (c) 2013-2016 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.\"
331ec923fdSMichael Gmelin.Dd March 18, 2016
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
42b39628e7SDag-Erling Smørgrav.Op Fl B Ar bytes
43dcd47379SDag-Erling Smørgrav.Op Fl -bind-address= Ns Ar host
44dcd47379SDag-Erling Smørgrav.Op Fl -ca-cert= Ns Ar file
45dcd47379SDag-Erling Smørgrav.Op Fl -ca-path= Ns Ar dir
46dcd47379SDag-Erling Smørgrav.Op Fl -cert= Ns Ar file
47dcd47379SDag-Erling Smørgrav.Op Fl -crl= Ns Ar file
487f92799fSMurray Stokely.Op Fl i Ar file
49dcd47379SDag-Erling Smørgrav.Op Fl -key= Ns Ar file
507dcb0a0eSDag-Erling Smørgrav.Op Fl N Ar file
51dcd47379SDag-Erling Smørgrav.Op Fl -no-passive
52dcd47379SDag-Erling Smørgrav.Op Fl -no-proxy= Ns Ar list
53dcd47379SDag-Erling Smørgrav.Op Fl -no-sslv3
54dcd47379SDag-Erling Smørgrav.Op Fl -no-tlsv1
55dcd47379SDag-Erling Smørgrav.Op Fl -no-verify-hostname
56dcd47379SDag-Erling Smørgrav.Op Fl -no-verify-peer
577fefc698SJordan K. Hubbard.Op Fl o Ar file
58dcd47379SDag-Erling Smørgrav.Op Fl -referer= Ns Ar URL
59e801aa48SRuslan Ermilov.Op Fl S Ar bytes
60e801aa48SRuslan Ermilov.Op Fl T Ar seconds
61dcd47379SDag-Erling Smørgrav.Op Fl -user-agent= Ns Ar agent-string
62b39628e7SDag-Erling Smørgrav.Op Fl w Ar seconds
63e801aa48SRuslan Ermilov.Ar URL ...
64e801aa48SRuslan Ermilov.Nm
65e801aa48SRuslan Ermilov.Op Fl 146AadFlMmnPpqRrsUv
66e801aa48SRuslan Ermilov.Op Fl B Ar bytes
67dcd47379SDag-Erling Smørgrav.Op Fl -bind-address= Ns Ar host
68dcd47379SDag-Erling Smørgrav.Op Fl -ca-cert= Ns Ar file
69dcd47379SDag-Erling Smørgrav.Op Fl -ca-path= Ns Ar dir
70dcd47379SDag-Erling Smørgrav.Op Fl -cert= Ns Ar file
71dcd47379SDag-Erling Smørgrav.Op Fl -crl= Ns Ar file
727f92799fSMurray Stokely.Op Fl i Ar file
73dcd47379SDag-Erling Smørgrav.Op Fl -key= Ns Ar file
74e801aa48SRuslan Ermilov.Op Fl N Ar file
75dcd47379SDag-Erling Smørgrav.Op Fl -no-passive
76dcd47379SDag-Erling Smørgrav.Op Fl -no-proxy= Ns Ar list
77dcd47379SDag-Erling Smørgrav.Op Fl -no-sslv3
78dcd47379SDag-Erling Smørgrav.Op Fl -no-tlsv1
79dcd47379SDag-Erling Smørgrav.Op Fl -no-verify-hostname
80dcd47379SDag-Erling Smørgrav.Op Fl -no-verify-peer
81e801aa48SRuslan Ermilov.Op Fl o Ar file
82dcd47379SDag-Erling Smørgrav.Op Fl -referer= Ns Ar URL
83e801aa48SRuslan Ermilov.Op Fl S Ar bytes
84e801aa48SRuslan Ermilov.Op Fl T Ar seconds
85dcd47379SDag-Erling Smørgrav.Op Fl -user-agent= Ns Ar agent-string
86e801aa48SRuslan Ermilov.Op Fl w Ar seconds
87e801aa48SRuslan Ermilov.Fl h Ar host Fl f Ar file Oo Fl c Ar dir Oc
887fefc698SJordan K. Hubbard.Sh DESCRIPTION
893898680cSPhilippe CharnierThe
903898680cSPhilippe Charnier.Nm
913898680cSPhilippe Charnierutility provides a command-line interface to the
92b39628e7SDag-Erling Smørgrav.Xr fetch 3
93b39628e7SDag-Erling Smørgravlibrary.
94b39628e7SDag-Erling SmørgravIts purpose is to retrieve the file(s) pointed to by the URL(s) on the
95b39628e7SDag-Erling Smørgravcommand line.
967fefc698SJordan K. Hubbard.Pp
977fefc698SJordan K. HubbardThe following options are available:
9876dafb89SGarrett Wollman.Bl -tag -width Fl
99dcd47379SDag-Erling Smørgrav.It Fl 1 , -one-file
100b39628e7SDag-Erling SmørgravStop and return exit code 0 at the first successfully retrieved file.
101dcd47379SDag-Erling Smørgrav.It Fl 4 , -ipv4-only
102b39628e7SDag-Erling SmørgravForces
103b39628e7SDag-Erling Smørgrav.Nm
104b39628e7SDag-Erling Smørgravto use IPv4 addresses only.
105dcd47379SDag-Erling Smørgrav.It Fl 6 , -ipv6-only
106b39628e7SDag-Erling SmørgravForces
107b39628e7SDag-Erling Smørgrav.Nm
108b39628e7SDag-Erling Smørgravto use IPv6 addresses only.
109dcd47379SDag-Erling Smørgrav.It Fl A , -no-redirect
110b39628e7SDag-Erling SmørgravDo not automatically follow ``temporary'' (302) redirects.
111b39628e7SDag-Erling SmørgravSome broken Web sites will return a redirect instead of a not-found
112b39628e7SDag-Erling Smørgraverror when the requested object does not exist.
113dcd47379SDag-Erling Smørgrav.It Fl a , -retry
1142494e810SGarrett WollmanAutomatically retry the transfer upon soft failures.
115dcd47379SDag-Erling Smørgrav.It Fl B Ar bytes , Fl -buffer-size= Ns Ar bytes
116b39628e7SDag-Erling SmørgravSpecify the read buffer size in bytes.
117c2ea176dSDag-Erling SmørgravThe default is 16,384 bytes.
118b39628e7SDag-Erling SmørgravAttempts to set a buffer size lower than this will be silently
119b39628e7SDag-Erling Smørgravignored.
120b39628e7SDag-Erling SmørgravThe number of reads actually performed is reported at verbosity level
121b39628e7SDag-Erling Smørgravtwo or higher (see the
122b39628e7SDag-Erling Smørgrav.Fl v
123b39628e7SDag-Erling Smørgravflag).
124dcd47379SDag-Erling Smørgrav.It Fl -bind-address= Ns Ar host
125dcd47379SDag-Erling SmørgravSpecifies a hostname or IP address to which sockets used for outgoing
126dcd47379SDag-Erling Smørgravconnections will be bound.
12778be3199SGarrett Wollman.It Fl c Ar dir
12878be3199SGarrett WollmanThe file to retrieve is in directory
12978be3199SGarrett Wollman.Ar dir
13078be3199SGarrett Wollmanon the remote host.
131047843ddSDag-Erling SmørgravThis option is deprecated and is provided for backward compatibility
132047843ddSDag-Erling Smørgravonly.
133dcd47379SDag-Erling Smørgrav.It Fl -ca-cert= Ns Ar file
134dcd47379SDag-Erling Smørgrav[SSL]
135dcd47379SDag-Erling SmørgravPath to certificate bundle containing trusted CA certificates.
136dcd47379SDag-Erling SmørgravIf not specified,
1371ec923fdSMichael Gmelin.Pa /usr/local/etc/ssl/cert.pem
138dcd47379SDag-Erling Smørgravis used.
1391ec923fdSMichael GmelinIf this file does not exist,
1401ec923fdSMichael Gmelin.Pa /etc/ssl/cert.pem
1411ec923fdSMichael Gmelinis used instead.
1421ec923fdSMichael GmelinIf neither file exists and no CA path has been configured,
1431ec923fdSMichael GmelinOpenSSL's default CA cert and path settings apply.
1441ec923fdSMichael GmelinThe certificate bundle can contain multiple CA certificates.
1451ec923fdSMichael GmelinThe
146dcd47379SDag-Erling Smørgrav.Pa security/ca_root_nss
1471ec923fdSMichael Gmelinport is a common source of a current CA bundle.
148dcd47379SDag-Erling Smørgrav.It Fl -ca-path= Ns Ar dir
149dcd47379SDag-Erling Smørgrav[SSL]
150dcd47379SDag-Erling SmørgravThe directory
151dcd47379SDag-Erling Smørgrav.Ar dir
152dcd47379SDag-Erling Smørgravcontains trusted CA hashes.
153dcd47379SDag-Erling Smørgrav.It Fl -cert= Ns Ar file
154dcd47379SDag-Erling Smørgrav[SSL]
155dcd47379SDag-Erling Smørgrav.Ar file
156dcd47379SDag-Erling Smørgravis a PEM encoded client certificate/key which will be used in
157dcd47379SDag-Erling Smørgravclient certificate authentication.
158dcd47379SDag-Erling Smørgrav.It Fl -crl= Ns Ar file
159dcd47379SDag-Erling Smørgrav[SSL]
160dcd47379SDag-Erling SmørgravPoints to certificate revocation list
161dcd47379SDag-Erling Smørgrav.Ar file ,
162dcd47379SDag-Erling Smørgravwhich has to be in PEM format and may contain peer certificates that have
163dcd47379SDag-Erling Smørgravbeen revoked.
164dcd47379SDag-Erling Smørgrav.It Fl d , -direct
165047843ddSDag-Erling SmørgravUse a direct connection even if a proxy is configured.
166dcd47379SDag-Erling Smørgrav.It Fl F , -force-restart
167b39628e7SDag-Erling SmørgravIn combination with the
168d6a8296aSBrian Feldman.Fl r
169b39628e7SDag-Erling Smørgravflag, forces a restart even if the local and remote files have
170b39628e7SDag-Erling Smørgravdifferent modification times.
1711bbb80b6SDag-Erling SmørgravImplies
1721bbb80b6SDag-Erling Smørgrav.Fl R .
17378be3199SGarrett Wollman.It Fl f Ar file
17478be3199SGarrett WollmanThe file to retrieve is named
17578be3199SGarrett Wollman.Ar file
17678be3199SGarrett Wollmanon the remote host.
177047843ddSDag-Erling SmørgravThis option is deprecated and is provided for backward compatibility
178047843ddSDag-Erling Smørgravonly.
17978be3199SGarrett Wollman.It Fl h Ar host
18078be3199SGarrett WollmanThe file to retrieve is located on the host
18178be3199SGarrett Wollman.Ar host .
182047843ddSDag-Erling SmørgravThis option is deprecated and is provided for backward compatibility
183047843ddSDag-Erling Smørgravonly.
184dcd47379SDag-Erling Smørgrav.It Fl i Ar file , Fl -if-modified-since= Ns Ar file
1857f92799fSMurray StokelyIf-Modified-Since mode: the remote file will only be retrieved if it
1867f92799fSMurray Stokelyis newer than
1877f92799fSMurray Stokely.Ar file
1887f92799fSMurray Stokelyon the local host.
1897f92799fSMurray Stokely(HTTP only)
190dcd47379SDag-Erling Smørgrav.It Fl -key= Ns Ar file
191dcd47379SDag-Erling Smørgrav[SSL]
192dcd47379SDag-Erling Smørgrav.Ar file
193dcd47379SDag-Erling Smørgravis a PEM encoded client key that will be used in client certificate
194dcd47379SDag-Erling Smørgravauthentication in case key and client certificate are stored separately.
195dcd47379SDag-Erling Smørgrav.It Fl l , -symlink
196b39628e7SDag-Erling SmørgravIf the target is a file-scheme URL, make a symbolic link to the target
197b39628e7SDag-Erling Smørgravrather than trying to copy it.
1987fefc698SJordan K. Hubbard.It Fl M
199dcd47379SDag-Erling Smørgrav.It Fl m , -mirror
2000b474bc6SDag-Erling SmørgravMirror mode: if the file already exists locally and has the same size
2010b474bc6SDag-Erling Smørgravand modification time as the remote file, it will not be fetched.
202c0b0d54eSDag-Erling SmørgravNote that the
203c0b0d54eSDag-Erling Smørgrav.Fl m
204c0b0d54eSDag-Erling Smørgravand
205c0b0d54eSDag-Erling Smørgrav.Fl r
206c0b0d54eSDag-Erling Smørgravflags are mutually exclusive.
207dcd47379SDag-Erling Smørgrav.It Fl N Ar file , Fl -netrc= Ns Ar file
2087dcb0a0eSDag-Erling SmørgravUse
2097dcb0a0eSDag-Erling Smørgrav.Ar file
2107dcb0a0eSDag-Erling Smørgravinstead of
2117dcb0a0eSDag-Erling Smørgrav.Pa ~/.netrc
2127dcb0a0eSDag-Erling Smørgravto look up login names and passwords for FTP sites.
2137dcb0a0eSDag-Erling SmørgravSee
2147dcb0a0eSDag-Erling Smørgrav.Xr ftp 1
2157dcb0a0eSDag-Erling Smørgravfor a description of the file format.
2167dcb0a0eSDag-Erling SmørgravThis feature is experimental.
217dcd47379SDag-Erling Smørgrav.It Fl n , -no-mtime
2180227791bSRuslan ErmilovDo not preserve the modification time of the transferred file.
219dcd47379SDag-Erling Smørgrav.It Fl -no-passive
220dcd47379SDag-Erling SmørgravForces the FTP code to use active mode.
221dcd47379SDag-Erling Smørgrav.It Fl -no-proxy= Ns Ar list
222dcd47379SDag-Erling SmørgravEither a single asterisk, which disables the use of proxies
223dcd47379SDag-Erling Smørgravaltogether, or a comma- or whitespace-separated list of hosts for
224dcd47379SDag-Erling Smørgravwhich proxies should not be used.
225dcd47379SDag-Erling Smørgrav.It Fl -no-sslv3
226dcd47379SDag-Erling Smørgrav[SSL]
2271ec923fdSMichael GmelinDo not allow SSL version 3 when negotiating the connection.
2281ec923fdSMichael GmelinThis option is deprecated and is provided for backward compatibility
2291ec923fdSMichael Gmelinonly.
2301ec923fdSMichael GmelinSSLv3 is disabled by default.
2311ec923fdSMichael GmelinSet
2321ec923fdSMichael Gmelin.Ev SSL_ALLOW_SSL3
2331ec923fdSMichael Gmelinto change this behavior.
234dcd47379SDag-Erling Smørgrav.It Fl -no-tlsv1
235dcd47379SDag-Erling Smørgrav[SSL]
2361ec923fdSMichael GmelinDo not allow TLS version 1 when negotiating the connection.
237dcd47379SDag-Erling Smørgrav.It Fl -no-verify-hostname
238dcd47379SDag-Erling Smørgrav[SSL]
239dcd47379SDag-Erling SmørgravDo not verify that the hostname matches the subject of the
240dcd47379SDag-Erling Smørgravcertificate presented by the server.
241dcd47379SDag-Erling Smørgrav.It Fl -no-verify-peer
242dcd47379SDag-Erling Smørgrav[SSL]
243dcd47379SDag-Erling SmørgravDo not verify the peer certificate against trusted CAs.
244dcd47379SDag-Erling Smørgrav.It Fl o Ar file , Fl output= Ns Ar file
24578be3199SGarrett WollmanSet the output file name to
24678be3199SGarrett Wollman.Ar file .
24778be3199SGarrett WollmanBy default, a ``pathname'' is extracted from the specified URI, and
248b39628e7SDag-Erling Smørgravits basename is used as the name of the output file.
249b39628e7SDag-Erling SmørgravA
25078be3199SGarrett Wollman.Ar file
25178be3199SGarrett Wollmanargument of
25278be3199SGarrett Wollman.Sq Li \&-
25378be3199SGarrett Wollmanindicates that results are to be directed to the standard output.
254fe6a0485SColin PercivalIf the
255fe6a0485SColin Percival.Ar file
256fe6a0485SColin Percivalargument is a directory, fetched file(s) will be placed within the
257fe6a0485SColin Percivaldirectory, with name(s) selected as in the default behaviour.
2587fefc698SJordan K. Hubbard.It Fl P
259dcd47379SDag-Erling Smørgrav.It Fl p , -passive
260b39628e7SDag-Erling SmørgravUse passive FTP.
261bb6e3329SDag-Erling SmørgravThese flags have no effect, since passive FTP is the default, but are
262bb6e3329SDag-Erling Smørgravprovided for compatibility with earlier versions where active FTP was
263bb6e3329SDag-Erling Smørgravthe default.
264dcd47379SDag-Erling SmørgravTo force active mode, use the
265dcd47379SDag-Erling Smørgrav.Fl -no-passive
266dcd47379SDag-Erling Smørgravflag or set the
267bb6e3329SDag-Erling Smørgrav.Ev FTP_PASSIVE_MODE
268bb6e3329SDag-Erling Smørgravenvironment variable to
269bb6e3329SDag-Erling Smørgrav.Ql NO .
270dcd47379SDag-Erling Smørgrav.It Fl -referer= Ns Ar URL
271dcd47379SDag-Erling SmørgravSpecifies the referrer URL to use for HTTP requests.
272dcd47379SDag-Erling SmørgravIf
273dcd47379SDag-Erling Smørgrav.Ar URL
274dcd47379SDag-Erling Smørgravis set to
275dcd47379SDag-Erling Smørgrav.Dq auto ,
276dcd47379SDag-Erling Smørgravthe document URL will be used as referrer URL.
277dcd47379SDag-Erling Smørgrav.It Fl q , -quiet
27887faa07bSSheldon HearnQuiet mode.
279dcd47379SDag-Erling Smørgrav.It Fl R , -keep-output
280b39628e7SDag-Erling SmørgravThe output files are precious, and should not be deleted under any
281b39628e7SDag-Erling Smørgravcircumstances, even if the transfer failed or was incomplete.
282dcd47379SDag-Erling Smørgrav.It Fl r , -restart
28378be3199SGarrett WollmanRestart a previously interrupted transfer.
284c0b0d54eSDag-Erling SmørgravNote that the
285c0b0d54eSDag-Erling Smørgrav.Fl m
286c0b0d54eSDag-Erling Smørgravand
287c0b0d54eSDag-Erling Smørgrav.Fl r
288c0b0d54eSDag-Erling Smørgravflags are mutually exclusive.
289dcd47379SDag-Erling Smørgrav.It Fl S Ar bytes , Fl -require-size= Ns Ar bytes
290b39628e7SDag-Erling SmørgravRequire the file size reported by the server to match the specified
291b39628e7SDag-Erling Smørgravvalue.
292b39628e7SDag-Erling SmørgravIf it does not, a message is printed and the file is not fetched.
293b39628e7SDag-Erling SmørgravIf the server does not support reporting file sizes, this option is
294b39628e7SDag-Erling Smørgravignored and the file is fetched unconditionally.
295dcd47379SDag-Erling Smørgrav.It Fl s , -print-size
296b39628e7SDag-Erling SmørgravPrint the size in bytes of each requested file, without fetching it.
297dcd47379SDag-Erling Smørgrav.It Fl T Ar seconds , Fl -timeout= Ns Ar seconds
298fc6fcbf9SJordan K. HubbardSet timeout value to
299fc6fcbf9SJordan K. Hubbard.Ar seconds .
300a43a248cSPeter WemmOverrides the environment variables
301fc6fcbf9SJordan K. Hubbard.Ev FTP_TIMEOUT
302b39628e7SDag-Erling Smørgravfor FTP transfers or
303a43a248cSPeter Wemm.Ev HTTP_TIMEOUT
304b39628e7SDag-Erling Smørgravfor HTTP transfers if set.
305dcd47379SDag-Erling Smørgrav.It Fl U , -passive-portrange-default
3067c480c6cSDag-Erling SmørgravWhen using passive FTP, allocate the port for the data connection from
3077c480c6cSDag-Erling Smørgravthe low (default) port range.
3087c480c6cSDag-Erling SmørgravSee
3097c480c6cSDag-Erling Smørgrav.Xr ip 4
3107c480c6cSDag-Erling Smørgravfor details on how to specify which port range this corresponds to.
311dcd47379SDag-Erling Smørgrav.It Fl -user-agent= Ns Ar agent-string
312dcd47379SDag-Erling SmørgravSpecifies the User-Agent string to use for HTTP requests.
313dcd47379SDag-Erling SmørgravThis can be useful when working with HTTP origin or proxy servers that
314dcd47379SDag-Erling Smørgravdifferentiate between user agents.
315dcd47379SDag-Erling Smørgrav.It Fl v , -verbose
31638a616e4SDag-Erling SmørgravIncrease verbosity level.
317dcd47379SDag-Erling Smørgrav.It Fl w Ar seconds , Fl -retry-delay= Ns Ar seconds
318b39628e7SDag-Erling SmørgravWhen the
319b39628e7SDag-Erling Smørgrav.Fl a
320b39628e7SDag-Erling Smørgravflag is specified, wait this many seconds between successive retries.
3217fefc698SJordan K. Hubbard.El
322ab47d799SRuslan Ermilov.Pp
323ab47d799SRuslan ErmilovIf
324ab47d799SRuslan Ermilov.Nm
325ab47d799SRuslan Ermilovreceives a
326ab47d799SRuslan Ermilov.Dv SIGINFO
327ab47d799SRuslan Ermilovsignal (see the
328ab47d799SRuslan Ermilov.Cm status
329ab47d799SRuslan Ermilovargument for
330ab47d799SRuslan Ermilov.Xr stty 1 ) ,
331ab47d799SRuslan Ermilovthe current transfer rate statistics will be written to the
332ab47d799SRuslan Ermilovstandard error output, in the same format as the standard completion
333ab47d799SRuslan Ermilovmessage.
3347fefc698SJordan K. Hubbard.Sh ENVIRONMENT
33509d2d42eSWes Peters.Bl -tag -width HTTP_TIMEOUT
33609d2d42eSWes Peters.It Ev FTP_TIMEOUT
3370fc781ffSDag-Erling SmørgravMaximum time, in seconds, to wait before aborting an FTP connection.
33809d2d42eSWes Peters.It Ev HTTP_TIMEOUT
3390fc781ffSDag-Erling SmørgravMaximum time, in seconds, to wait before aborting an HTTP connection.
340cec5287bSWes Peters.El
34109d2d42eSWes Peters.Pp
3420fc781ffSDag-Erling SmørgravSee
34309d2d42eSWes Peters.Xr fetch 3
3440fc781ffSDag-Erling Smørgravfor a description of additional environment variables, including
3450fc781ffSDag-Erling Smørgrav.Ev FETCH_BIND_ADDRESS ,
3460fc781ffSDag-Erling Smørgrav.Ev FTP_LOGIN ,
3470fc781ffSDag-Erling Smørgrav.Ev FTP_PASSIVE_MODE ,
3480fc781ffSDag-Erling Smørgrav.Ev FTP_PASSWORD ,
3490fc781ffSDag-Erling Smørgrav.Ev FTP_PROXY ,
3500fc781ffSDag-Erling Smørgrav.Ev ftp_proxy ,
3511453595fSDag-Erling Smørgrav.Ev HTTP_ACCEPT ,
3520fc781ffSDag-Erling Smørgrav.Ev HTTP_AUTH ,
3530fc781ffSDag-Erling Smørgrav.Ev HTTP_PROXY ,
3540fc781ffSDag-Erling Smørgrav.Ev http_proxy ,
3550fc781ffSDag-Erling Smørgrav.Ev HTTP_PROXY_AUTH ,
3560fc781ffSDag-Erling Smørgrav.Ev HTTP_REFERER ,
3570fc781ffSDag-Erling Smørgrav.Ev HTTP_USER_AGENT ,
3580fc781ffSDag-Erling Smørgrav.Ev NETRC ,
359dcd47379SDag-Erling Smørgrav.Ev NO_PROXY ,
360dcd47379SDag-Erling Smørgrav.Ev no_proxy ,
361dcd47379SDag-Erling Smørgrav.Ev SSL_CA_CERT_FILE ,
362dcd47379SDag-Erling Smørgrav.Ev SSL_CA_CERT_PATH ,
363dcd47379SDag-Erling Smørgrav.Ev SSL_CLIENT_CERT_FILE ,
364dcd47379SDag-Erling Smørgrav.Ev SSL_CLIENT_KEY_FILE ,
365dcd47379SDag-Erling Smørgrav.Ev SSL_CRL_FILE ,
3661ec923fdSMichael Gmelin.Ev SSL_ALLOW_SSL3 ,
367dcd47379SDag-Erling Smørgrav.Ev SSL_NO_TLS1 ,
3681ec923fdSMichael Gmelin.Ev SSL_NO_TLS1_1 ,
3691ec923fdSMichael Gmelin.Ev SSL_NO_TLS1_2 ,
370dcd47379SDag-Erling Smørgrav.Ev SSL_NO_VERIFY_HOSTNAME
371011a8335SDag-Erling Smørgravand
372dcd47379SDag-Erling Smørgrav.Ev SSL_NO_VERIFY_PEER .
3736c7216dfSRuslan Ermilov.Sh EXIT STATUS
3746c7216dfSRuslan ErmilovThe
3756c7216dfSRuslan Ermilov.Nm
3766c7216dfSRuslan Ermilovcommand returns zero on success, or one on failure.
3776c7216dfSRuslan ErmilovIf multiple URLs are listed on the command line,
3786c7216dfSRuslan Ermilov.Nm
379ee8e4b36SJoseph Koshywill attempt to retrieve each one of them in turn, and will return
380ee8e4b36SJoseph Koshyzero only if they were all successfully retrieved.
3817f92799fSMurray Stokely.Pp
3827f92799fSMurray StokelyIf the
3837f92799fSMurray Stokely.Fl i
3847f92799fSMurray Stokelyargument is used and the remote file is not newer than the
3857f92799fSMurray Stokelyspecified file then the command will still return success,
3867f92799fSMurray Stokelyalthough no file is transferred.
3877fefc698SJordan K. Hubbard.Sh SEE ALSO
388*43a623c8SEdward Tomasz Napierala.Xr fetch 3 ,
389*43a623c8SEdward Tomasz Napierala.Xr phttpget 8
3907fefc698SJordan K. Hubbard.Sh HISTORY
3917fefc698SJordan K. HubbardThe
392b39628e7SDag-Erling Smørgrav.Nm
39385cf659aSMike Pritchardcommand appeared in
39485cf659aSMike Pritchard.Fx 2.1.5 .
395b39628e7SDag-Erling SmørgravThis implementation first appeared in
396b39628e7SDag-Erling Smørgrav.Fx 4.1 .
39778be3199SGarrett Wollman.Sh AUTHORS
398f4d874a1SRuslan Ermilov.An -nosplit
39978be3199SGarrett WollmanThe original implementation of
40078be3199SGarrett Wollman.Nm
401306005e7SPhilippe Charnierwas done by
4022b7af31cSBaptiste Daroussin.An Jean-Marc Zucconi Aq Mt jmz@FreeBSD.org .
403306005e7SPhilippe CharnierIt was extensively re-worked for
404bc5d5816SWolfram Schneider.Fx 2.2
405306005e7SPhilippe Charnierby
4062b7af31cSBaptiste Daroussin.An Garrett Wollman Aq Mt wollman@FreeBSD.org ,
407b39628e7SDag-Erling Smørgravand later completely rewritten to use the
408b39628e7SDag-Erling Smørgrav.Xr fetch 3
409b39628e7SDag-Erling Smørgravlibrary by
4102b7af31cSBaptiste Daroussin.An Dag-Erling Sm\(/orgrav Aq Mt des@FreeBSD.org
411dcd47379SDag-Erling Smørgravand
4122b7af31cSBaptiste Daroussin.An Michael Gmelin Aq Mt freebsd@grem.de .
413b39628e7SDag-Erling Smørgrav.Sh NOTES
4142494e810SGarrett WollmanThe
4150c8cc99eSGarrett Wollman.Fl b
416b39628e7SDag-Erling Smørgravand
417b39628e7SDag-Erling Smørgrav.Fl t
418b39628e7SDag-Erling Smørgravoptions are no longer supported and will generate warnings.
419b39628e7SDag-Erling SmørgravThey were workarounds for bugs in other OSes which this implementation
420b39628e7SDag-Erling Smørgravdoes not trigger.
421c1468430SGarrett Wollman.Pp
422047843ddSDag-Erling SmørgravOne cannot both use the
423047843ddSDag-Erling Smørgrav.Fl h ,
424cf575052SBen Smithurst.Fl c
425cf575052SBen Smithurstand
426b39628e7SDag-Erling Smørgrav.Fl f
427047843ddSDag-Erling Smørgravoptions and specify URLs on the command line.
428