xref: /freebsd/usr.bin/fetch/fetch.1 (revision a43a248c32b25d6b28c8ee9ddb2c33690c2fa2e5)
1a43a248cSPeter Wemm.\" $Id: fetch.1,v 1.7 1996/08/31 22:03:00 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.
84a43a248cSPeter WemmOverrides the environment variables
85fc6fcbf9SJordan K. Hubbard.Ev FTP_TIMEOUT
86a43a248cSPeter Wemmfor ftp transfers or
87a43a248cSPeter Wemm.Ev HTTP_TIMEOUT
88a43a248cSPeter Wemmfor http transfers if set.
897fefc698SJordan K. Hubbard.It Fl q
907fefc698SJordan K. HubbardQuiet mode. Do not report transfer progress on the terminal.
917ae26f14SJordan K. Hubbard.It Fl v
927ae26f14SJordan K. HubbardVerbose mode - display FTP connection information in painful detail.
937fefc698SJordan K. Hubbard.It Fl r
947fefc698SJordan K. HubbardReget. Use this flag to restart an interrupted transfer.
957fefc698SJordan K. Hubbard.It Fl o Ar file
967fefc698SJordan K. HubbardSet the output file name to
977fefc698SJordan K. Hubbard.Ar file
987fefc698SJordan K. Hubbard.El
997fefc698SJordan K. Hubbard.Sh ENVIRONMENT
1007fefc698SJordan K. HubbardA transfer using the
1017fefc698SJordan K. Hubbard.Em ftp
1027fefc698SJordan K. Hubbardprotocol will be aborted after the delay specified by the
1037fefc698SJordan K. Hubbard.Ev FTP_TIMEOUT
1047fefc698SJordan K. Hubbardvariable. The default is 300 (seconds)
1057fefc698SJordan K. Hubbard
1067fefc698SJordan K. HubbardA transfer using the
1077fefc698SJordan K. Hubbard.Em http
1087fefc698SJordan K. Hubbardprotocol will be aborted after the delay specified by the
1097fefc698SJordan K. Hubbard.Ev HTTP_TIMEOUT
110a43a248cSPeter Wemmvariable. The default is 300 (seconds)
1117fefc698SJordan K. Hubbard
1127fefc698SJordan K. Hubbard.Ev FTP_LOGIN
1137fefc698SJordan K. Hubbardis the login name for the remote host. Default is
1147fefc698SJordan K. Hubbard.Em anonymous
1157fefc698SJordan K. Hubbard
1167fefc698SJordan K. Hubbard.Ev FTP_PASSWORD
1177fefc698SJordan K. Hubbardis the password for the remote host. Default is
1187fefc698SJordan K. Hubbard.Em <yourname>@
1197fefc698SJordan K. Hubbard
1207fefc698SJordan K. Hubbard.Ev FTP_PASSIVE_MODE
1217fefc698SJordan K. Hubbardwill force the use of passive mode FTP for firewalls.
122477a3f54SJordan K. Hubbard
123477a3f54SJordan K. HubbardIf
124477a3f54SJordan K. Hubbard.Ev HTTP_PROXY
125477a3f54SJordan K. Hubbardis set to a value of the form
126477a3f54SJordan K. Hubbard.Em host:port
127477a3f54SJordan K. Hubbardit specifies the address of a http proxy. The proxy will be used
128477a3f54SJordan K. Hubbardfor all ftp and http requests. This is useful if you are behind
129477a3f54SJordan K. Hubbardan application firewall.
1307fefc698SJordan K. Hubbard.Sh SEE ALSO
1317fefc698SJordan K. Hubbard.Xr tftp 1
1327fefc698SJordan K. Hubbard.Xr ftp 1
1337fefc698SJordan K. Hubbard.Sh HISTORY
1347fefc698SJordan K. HubbardThe
1357fefc698SJordan K. Hubbard.Nm fetch
13685cf659aSMike Pritchardcommand appeared in
13785cf659aSMike Pritchard.Fx 2.1.5 .
138