xref: /freebsd/usr.bin/fetch/fetch.1 (revision 85cf659a76c326657bdd669b8da48dbda4279b30)
185cf659aSMike Pritchard.\" $Id: fetch.1,v 1.5 1996/08/22 21:30:50 jkh Exp $
27fefc698SJordan K. Hubbard.Dd July 2, 1996
37fefc698SJordan K. Hubbard.Dt FETCH 1
47fefc698SJordan K. Hubbard.Os
57fefc698SJordan K. Hubbard.Sh NAME
67fefc698SJordan K. Hubbard.Nm fetch
77fefc698SJordan K. Hubbard.Nd retrieve a file by Uniform Resource Locator
87fefc698SJordan K. Hubbard.Sh SYNOPSIS
97fefc698SJordan K. Hubbard.Nm fetch
106b5c2db2SJordan K. Hubbard.Op Fl MPmnpqr
117fefc698SJordan K. Hubbard.Op Fl o Ar file
127fefc698SJordan K. Hubbard.Ar URL
137fefc698SJordan K. Hubbard.Nm fetch
146b5c2db2SJordan K. Hubbard.Op Fl MPmnpqr
157fefc698SJordan K. Hubbard.Op Fl o Ar file
167fefc698SJordan K. Hubbard.Op Fl c Ar dir
177fefc698SJordan K. Hubbard.Fl f Ar file
187fefc698SJordan K. Hubbard.Fl h Ar host
197fefc698SJordan K. Hubbard.Sh DESCRIPTION
207fefc698SJordan K. Hubbard.Nm fetch
217fefc698SJordan K. Hubbardallows a user to transfer files from a remote network site using
227fefc698SJordan K. Hubbardeither the
237fefc698SJordan K. Hubbard.Em ftp
247fefc698SJordan K. Hubbardor the
257fefc698SJordan K. Hubbard.Em http
267fefc698SJordan K. Hubbardprotocol. In the first form of the command, the
277fefc698SJordan K. Hubbard.Ar URL
287fefc698SJordan K. Hubbardmay be of the form
297fefc698SJordan K. Hubbard.Em http://site.domain/path/to/the/file
307fefc698SJordan K. Hubbardor
317fefc698SJordan K. Hubbard.Em ftp://site.domain/path/to/the/file.
327fefc698SJordan K. HubbardFor compatibility with
337fefc698SJordan K. Hubbard.Xr tftp 1
347fefc698SJordan K. Hubbardthe form
357fefc698SJordan K. Hubbard.Em site.domain:/path/to/the/file
367fefc698SJordan K. Hubbardis also accepted.
37fc6fcbf9SJordan K. HubbardTo denote a local filename to be copied or linked to (see
38fc6fcbf9SJordan K. Hubbard.Fl l
39fc6fcbf9SJordan K. Hubbardflag), the
40fc6fcbf9SJordan K. Hubbard.Em file:/path/to/the/file
41fc6fcbf9SJordan K. HubbardURL form is used.
427fefc698SJordan K. Hubbard
437fefc698SJordan K. HubbardThe second form of the command can be used to get a file using the
447fefc698SJordan K. Hubbard.Em ftp
457fefc698SJordan K. Hubbardprotocol, specifying the file name and the remote host with the
467fefc698SJordan K. Hubbard.Fl h
477fefc698SJordan K. Hubbardand the
487fefc698SJordan K. Hubbard.Fl f
497fefc698SJordan K. Hubbardflags.
507fefc698SJordan K. Hubbard.Pp
517fefc698SJordan K. HubbardThe following options are available:
527fefc698SJordan K. Hubbard.Bl -tag -width Fl -compact
537fefc698SJordan K. Hubbard.It Fl M
547fefc698SJordan K. Hubbard.It Fl m
557fefc698SJordan K. HubbardMirror mode: Set the modification time of the file so that it is
567fefc698SJordan K. Hubbardidentical to the modification time of the file at the remote host.
577fefc698SJordan K. HubbardIf the file already exists on the local host and is identical (as
587fefc698SJordan K. Hubbardgauged by size and modification time), no transfer is done.
596b5c2db2SJordan K. Hubbard.It Fl n
606b5c2db2SJordan K. HubbardDon't preserve the modtime of the transfered file, use the current time.
617fefc698SJordan K. Hubbard.It Fl P
627fefc698SJordan K. Hubbard.It Fl p
637fefc698SJordan K. HubbardUse passive mode if you are behind a firewall.
647fefc698SJordan K. Hubbard.It Fl c Ar dir
657fefc698SJordan K. HubbardChange to directory
667fefc698SJordan K. Hubbard.Ar dir
677fefc698SJordan K. Hubbardat remote host before starting the transfer.
687fefc698SJordan K. Hubbard.It Fl f Ar file
697fefc698SJordan K. HubbardRetrieve
707fefc698SJordan K. Hubbard.Ar file
717fefc698SJordan K. Hubbardon the remote host.
727fefc698SJordan K. Hubbard.It Fl h Ar host
737fefc698SJordan K. HubbardSet the
747fefc698SJordan K. Hubbard.Ar host
757fefc698SJordan K. Hubbardfor transfer.
76fc6fcbf9SJordan K. Hubbard.It Fl l
77fc6fcbf9SJordan K. HubbardIf target is a
78fc6fcbf9SJordan K. Hubbard.Ar file:/
79fc6fcbf9SJordan K. Hubbardstyle of URL, make a link to the target rather than trying
80fc6fcbf9SJordan K. Hubbardto copy it.
81fc6fcbf9SJordan K. Hubbard.It Fl T Ar seconds
82fc6fcbf9SJordan K. HubbardSet timeout value to
83fc6fcbf9SJordan K. Hubbard.Ar seconds.
84fc6fcbf9SJordan K. HubbardOverrides
85fc6fcbf9SJordan K. Hubbard.Ev FTP_TIMEOUT
86fc6fcbf9SJordan K. Hubbardenvironment variable, if set.
877fefc698SJordan K. Hubbard.It Fl q
887fefc698SJordan K. HubbardQuiet mode. Do not report transfer progress on the terminal.
897fefc698SJordan K. Hubbard.It Fl r
907fefc698SJordan K. HubbardReget. Use this flag to restart an interrupted transfer.
917fefc698SJordan K. Hubbard.It Fl o Ar file
927fefc698SJordan K. HubbardSet the output file name to
937fefc698SJordan K. Hubbard.Ar file
947fefc698SJordan K. Hubbard.El
957fefc698SJordan K. Hubbard.Sh ENVIRONMENT
967fefc698SJordan K. HubbardA transfer using the
977fefc698SJordan K. Hubbard.Em ftp
987fefc698SJordan K. Hubbardprotocol will be aborted after the delay specified by the
997fefc698SJordan K. Hubbard.Ev FTP_TIMEOUT
1007fefc698SJordan K. Hubbardvariable. The default is 300 (seconds)
1017fefc698SJordan K. Hubbard
1027fefc698SJordan K. HubbardA transfer using the
1037fefc698SJordan K. Hubbard.Em http
1047fefc698SJordan K. Hubbardprotocol will be aborted after the delay specified by the
1057fefc698SJordan K. Hubbard.Ev HTTP_TIMEOUT
1067fefc698SJordan K. Hubbardvariable. The default is 60 (seconds)
1077fefc698SJordan K. Hubbard
1087fefc698SJordan K. Hubbard.Ev FTP_LOGIN
1097fefc698SJordan K. Hubbardis the login name for the remote host. Default is
1107fefc698SJordan K. Hubbard.Em anonymous
1117fefc698SJordan K. Hubbard
1127fefc698SJordan K. Hubbard.Ev FTP_PASSWORD
1137fefc698SJordan K. Hubbardis the password for the remote host. Default is
1147fefc698SJordan K. Hubbard.Em <yourname>@
1157fefc698SJordan K. Hubbard
1167fefc698SJordan K. Hubbard.Ev FTP_PASSIVE_MODE
1177fefc698SJordan K. Hubbardwill force the use of passive mode FTP for firewalls.
118477a3f54SJordan K. Hubbard
119477a3f54SJordan K. HubbardIf
120477a3f54SJordan K. Hubbard.Ev HTTP_PROXY
121477a3f54SJordan K. Hubbardis set to a value of the form
122477a3f54SJordan K. Hubbard.Em host:port
123477a3f54SJordan K. Hubbardit specifies the address of a http proxy. The proxy will be used
124477a3f54SJordan K. Hubbardfor all ftp and http requests. This is useful if you are behind
125477a3f54SJordan K. Hubbardan application firewall.
1267fefc698SJordan K. Hubbard.Sh SEE ALSO
1277fefc698SJordan K. Hubbard.Xr tftp 1
1287fefc698SJordan K. Hubbard.Xr ftp 1
1297fefc698SJordan K. Hubbard.Sh HISTORY
1307fefc698SJordan K. HubbardThe
1317fefc698SJordan K. Hubbard.Nm fetch
13285cf659aSMike Pritchardcommand appeared in
13385cf659aSMike Pritchard.Fx 2.1.5 .
134