| @@ -1,1285 +1,1284 @@ | | | @@ -1,1285 +1,1284 @@ |
1 | .\" $NetBSD: ftp.1,v 1.139 2020/07/15 16:41:16 pgoyette Exp $ | | 1 | .\" $NetBSD: ftp.1,v 1.140 2020/07/15 17:36:38 uwe Exp $ |
2 | .\" | | 2 | .\" |
3 | .\" Copyright (c) 1996-2020 The NetBSD Foundation, Inc. | | 3 | .\" Copyright (c) 1996-2020 The NetBSD Foundation, Inc. |
4 | .\" All rights reserved. | | 4 | .\" All rights reserved. |
5 | .\" | | 5 | .\" |
6 | .\" This code is derived from software contributed to The NetBSD Foundation | | 6 | .\" This code is derived from software contributed to The NetBSD Foundation |
7 | .\" by Luke Mewburn. | | 7 | .\" by Luke Mewburn. |
8 | .\" | | 8 | .\" |
9 | .\" Redistribution and use in source and binary forms, with or without | | 9 | .\" Redistribution and use in source and binary forms, with or without |
10 | .\" modification, are permitted provided that the following conditions | | 10 | .\" modification, are permitted provided that the following conditions |
11 | .\" are met: | | 11 | .\" are met: |
12 | .\" 1. Redistributions of source code must retain the above copyright | | 12 | .\" 1. Redistributions of source code must retain the above copyright |
13 | .\" notice, this list of conditions and the following disclaimer. | | 13 | .\" notice, this list of conditions and the following disclaimer. |
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 14 | .\" 2. Redistributions in binary form must reproduce the above copyright |
15 | .\" notice, this list of conditions and the following disclaimer in the | | 15 | .\" notice, this list of conditions and the following disclaimer in the |
16 | .\" documentation and/or other materials provided with the distribution. | | 16 | .\" documentation and/or other materials provided with the distribution. |
17 | .\" | | 17 | .\" |
18 | .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS | | 18 | .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS |
19 | .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | | 19 | .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
20 | .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | | 20 | .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
21 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | | 21 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
22 | .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | | 22 | .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
23 | .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | | 23 | .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
24 | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | | 24 | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
25 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | | 25 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
26 | .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | 26 | .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
27 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | 27 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
28 | .\" POSSIBILITY OF SUCH DAMAGE. | | 28 | .\" POSSIBILITY OF SUCH DAMAGE. |
29 | .\" | | 29 | .\" |
30 | .\" | | 30 | .\" |
31 | .\" Copyright (c) 1985, 1989, 1990, 1993 | | 31 | .\" Copyright (c) 1985, 1989, 1990, 1993 |
32 | .\" The Regents of the University of California. All rights reserved. | | 32 | .\" The Regents of the University of California. All rights reserved. |
33 | .\" | | 33 | .\" |
34 | .\" Redistribution and use in source and binary forms, with or without | | 34 | .\" Redistribution and use in source and binary forms, with or without |
35 | .\" modification, are permitted provided that the following conditions | | 35 | .\" modification, are permitted provided that the following conditions |
36 | .\" are met: | | 36 | .\" are met: |
37 | .\" 1. Redistributions of source code must retain the above copyright | | 37 | .\" 1. Redistributions of source code must retain the above copyright |
38 | .\" notice, this list of conditions and the following disclaimer. | | 38 | .\" notice, this list of conditions and the following disclaimer. |
39 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 39 | .\" 2. Redistributions in binary form must reproduce the above copyright |
40 | .\" notice, this list of conditions and the following disclaimer in the | | 40 | .\" notice, this list of conditions and the following disclaimer in the |
41 | .\" documentation and/or other materials provided with the distribution. | | 41 | .\" documentation and/or other materials provided with the distribution. |
42 | .\" 3. Neither the name of the University nor the names of its contributors | | 42 | .\" 3. Neither the name of the University nor the names of its contributors |
43 | .\" may be used to endorse or promote products derived from this software | | 43 | .\" may be used to endorse or promote products derived from this software |
44 | .\" without specific prior written permission. | | 44 | .\" without specific prior written permission. |
45 | .\" | | 45 | .\" |
46 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | | 46 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
47 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | | 47 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
48 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | | 48 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
49 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | | 49 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
50 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | | 50 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
51 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | | 51 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
52 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 52 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
53 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 53 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
54 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 54 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
55 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 55 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
56 | .\" SUCH DAMAGE. | | 56 | .\" SUCH DAMAGE. |
57 | .\" | | 57 | .\" |
58 | .\" @(#)ftp.1 8.3 (Berkeley) 10/9/94 | | 58 | .\" @(#)ftp.1 8.3 (Berkeley) 10/9/94 |
59 | .\" | | 59 | .\" |
60 | .Dd July 15, 2020 | | 60 | .Dd July 15, 2020 |
61 | .Dt FTP 1 | | 61 | .Dt FTP 1 |
62 | .Os | | 62 | .Os |
63 | .Sh NAME | | 63 | .Sh NAME |
64 | .Nm ftp | | 64 | .Nm ftp |
65 | .Nd Internet file transfer program | | 65 | .Nd Internet file transfer program |
66 | .Sh SYNOPSIS | | 66 | .Sh SYNOPSIS |
67 | .Nm | | 67 | .Nm |
68 | .Op Fl 46AadefginpRtVv | | 68 | .Op Fl 46AadefginpRtVv |
69 | .Op Fl N Ar netrc | | 69 | .Op Fl N Ar netrc |
70 | .Op Fl o Ar output | | 70 | .Op Fl o Ar output |
71 | .Op Fl P Ar port | | 71 | .Op Fl P Ar port |
72 | .Op Fl q Ar quittime | | 72 | .Op Fl q Ar quittime |
73 | .Op Fl r Ar retry | | 73 | .Op Fl r Ar retry |
74 | .Op Fl s Ar srcaddr | | 74 | .Op Fl s Ar srcaddr |
75 | .Bk -words | | 75 | .Bk -words |
76 | .\" [-T dir,max[,inc]] | | 76 | .\" [-T dir,max[,inc]] |
77 | .Oo | | 77 | .Oo |
78 | .Fl T Xo | | 78 | .Fl T Xo |
79 | .Sm off | | 79 | .Sm off |
80 | .Ar dir , | | 80 | .Ar dir , |
81 | .Ar max | | 81 | .Ar max |
82 | .Op , Ar inc | | 82 | .Op , Ar inc |
83 | .Sm on | | 83 | .Sm on |
84 | .Xc | | 84 | .Xc |
85 | .Oc | | 85 | .Oc |
86 | .Ek | | 86 | .Ek |
87 | .Op Fl x Ar xfersize | | 87 | .Op Fl x Ar xfersize |
88 | .Bk -words | | 88 | .Bk -words |
89 | .\" [[user@]host [port]] | | 89 | .\" [[user@]host [port]] |
90 | .Oo | | 90 | .Oo |
91 | .Oo Ar user Ns Li \&@ Oc Ns Ar host Oo Ar port Oc | | 91 | .Oo Ar user Ns Li \&@ Oc Ns Ar host Oo Ar port Oc |
92 | .Oc | | 92 | .Oc |
93 | .Ek | | 93 | .Ek |
94 | .Bk -words | | 94 | .Bk -words |
95 | .\" [[user@]host:[path][/]] | | 95 | .\" [[user@]host:[path][/]] |
96 | .Sm off | | 96 | .Sm off |
97 | .Oo | | 97 | .Oo |
98 | .Op Ar user Li \&@ | | 98 | .Op Ar user Li \&@ |
99 | .Ar host Li \&: | | 99 | .Ar host Li \&: |
100 | .Op Ar path | | 100 | .Op Ar path |
101 | .Op Li / | | 101 | .Op Li / |
102 | .Oc | | 102 | .Oc |
103 | .Sm on | | 103 | .Sm on |
104 | .Ek | | 104 | .Ek |
105 | .Bk -words | | 105 | .Bk -words |
106 | .\" [file:///path] | | 106 | .\" [file:///path] |
107 | .Sm off | | 107 | .Sm off |
108 | .Oo | | 108 | .Oo |
109 | .Li file:/// Ar path | | 109 | .Li file:/// Ar path |
110 | .Oc | | 110 | .Oc |
111 | .Sm on | | 111 | .Sm on |
112 | .Ek | | 112 | .Ek |
113 | .Bk -words | | 113 | .Bk -words |
114 | .\" [ftp://[user[:password]@]host[:port]/path[/]] | | 114 | .\" [ftp://[user[:password]@]host[:port]/path[/]] |
115 | .Sm off | | 115 | .Sm off |
116 | .Oo | | 116 | .Oo |
117 | .Li ftp:// | | 117 | .Li ftp:// |
118 | .Oo Ar user | | 118 | .Oo Ar user |
119 | .Op Li \&: Ar password | | 119 | .Op Li \&: Ar password |
120 | .Li \&@ Oc | | 120 | .Li \&@ Oc |
121 | .Ar host Oo Li \&: Ar port Oc | | 121 | .Ar host Oo Li \&: Ar port Oc |
122 | .Li / Ar path | | 122 | .Li / Ar path |
123 | .Op Li / | | 123 | .Op Li / |
124 | .Op Li ;type= Ar X | | 124 | .Op Li ;type= Ar X |
125 | .Oc | | 125 | .Oc |
126 | .Sm on | | 126 | .Sm on |
127 | .Ek | | 127 | .Ek |
128 | .Bk -words | | 128 | .Bk -words |
129 | .\" [http://[user[:password]@]host[:port]/path] | | 129 | .\" [http://[user[:password]@]host[:port]/path] |
130 | .Sm off | | 130 | .Sm off |
131 | .Oo | | 131 | .Oo |
132 | .Li http:// | | 132 | .Li http:// |
133 | .Oo Ar user | | 133 | .Oo Ar user |
134 | .Op Li \&: Ar password | | 134 | .Op Li \&: Ar password |
135 | .Li \&@ Oc | | 135 | .Li \&@ Oc |
136 | .Ar host Oo Li \&: Ar port Oc | | 136 | .Ar host Oo Li \&: Ar port Oc |
137 | .Li / Ar path | | 137 | .Li / Ar path |
138 | .Oc | | 138 | .Oc |
139 | .Sm on | | 139 | .Sm on |
140 | .Ek | | 140 | .Ek |
141 | .Op Ar \&.\&.\&. | | 141 | .Ar \&... |
142 | .Nm | | 142 | .Nm |
143 | .Bk -words | | 143 | .Bk -words |
144 | .Fl u Ar url Ar file | | 144 | .Fl u Ar url Ar |
145 | .Ek | | 145 | .Ek |
146 | .Op Ar \&.\&.\&. | | | |
147 | .Sh DESCRIPTION | | 146 | .Sh DESCRIPTION |
148 | .Nm | | 147 | .Nm |
149 | is the user interface to the Internet standard File Transfer Protocol. | | 148 | is the user interface to the Internet standard File Transfer Protocol. |
150 | The program allows a user to transfer files to and from a | | 149 | The program allows a user to transfer files to and from a |
151 | remote network site. | | 150 | remote network site. |
152 | .Pp | | 151 | .Pp |
153 | The last five arguments will fetch a file using the | | 152 | The last five arguments will fetch a file using the |
154 | .Tn FTP | | 153 | .Tn FTP |
155 | or | | 154 | or |
156 | .Tn HTTP | | 155 | .Tn HTTP |
157 | protocols, or by direct copying, into the current directory. | | 156 | protocols, or by direct copying, into the current directory. |
158 | This is ideal for scripts. | | 157 | This is ideal for scripts. |
159 | Refer to | | 158 | Refer to |
160 | .Sx AUTO-FETCHING FILES | | 159 | .Sx AUTO-FETCHING FILES |
161 | below for more information. | | 160 | below for more information. |
162 | .Pp | | 161 | .Pp |
163 | Options may be specified at the command line, or to the | | 162 | Options may be specified at the command line, or to the |
164 | command interpreter. | | 163 | command interpreter. |
165 | .Bl -tag -width Fl | | 164 | .Bl -tag -width Fl |
166 | .It Fl 4 | | 165 | .It Fl 4 |
167 | Forces | | 166 | Forces |
168 | .Nm | | 167 | .Nm |
169 | to only use IPv4 addresses. | | 168 | to only use IPv4 addresses. |
170 | .It Fl 6 | | 169 | .It Fl 6 |
171 | Forces | | 170 | Forces |
172 | .Nm | | 171 | .Nm |
173 | to only use IPv6 addresses. | | 172 | to only use IPv6 addresses. |
174 | .It Fl A | | 173 | .It Fl A |
175 | Force active mode ftp. | | 174 | Force active mode ftp. |
176 | By default, | | 175 | By default, |
177 | .Nm | | 176 | .Nm |
178 | will try to use passive mode ftp and fall back to active mode | | 177 | will try to use passive mode ftp and fall back to active mode |
179 | if passive is not supported by the server. | | 178 | if passive is not supported by the server. |
180 | This option causes | | 179 | This option causes |
181 | .Nm | | 180 | .Nm |
182 | to always use an active connection. | | 181 | to always use an active connection. |
183 | It is only useful for connecting to very old servers that do not | | 182 | It is only useful for connecting to very old servers that do not |
184 | implement passive mode properly. | | 183 | implement passive mode properly. |
185 | .It Fl a | | 184 | .It Fl a |
186 | Causes | | 185 | Causes |
187 | .Nm | | 186 | .Nm |
188 | to bypass normal login procedure, and use an anonymous login instead. | | 187 | to bypass normal login procedure, and use an anonymous login instead. |
189 | .It Fl d | | 188 | .It Fl d |
190 | Enables debugging. | | 189 | Enables debugging. |
191 | .It Fl e | | 190 | .It Fl e |
192 | Disables command line editing. | | 191 | Disables command line editing. |
193 | This is useful for Emacs ange-ftp mode. | | 192 | This is useful for Emacs ange-ftp mode. |
194 | .It Fl f | | 193 | .It Fl f |
195 | Forces a cache reload for transfers that go through the | | 194 | Forces a cache reload for transfers that go through the |
196 | .Tn FTP | | 195 | .Tn FTP |
197 | or | | 196 | or |
198 | .Tn HTTP | | 197 | .Tn HTTP |
199 | proxies. | | 198 | proxies. |
200 | .It Fl g | | 199 | .It Fl g |
201 | Disables file name globbing. | | 200 | Disables file name globbing. |
202 | .It Fl i | | 201 | .It Fl i |
203 | Turns off interactive prompting during | | 202 | Turns off interactive prompting during |
204 | multiple file transfers. | | 203 | multiple file transfers. |
205 | .It Fl N Ar netrc | | 204 | .It Fl N Ar netrc |
206 | Use | | 205 | Use |
207 | .Ar netrc | | 206 | .Ar netrc |
208 | instead of | | 207 | instead of |
209 | .Pa ~/.netrc . | | 208 | .Pa ~/.netrc . |
210 | Refer to | | 209 | Refer to |
211 | .Sx THE .netrc FILE | | 210 | .Sx THE .netrc FILE |
212 | for more information. | | 211 | for more information. |
213 | .It Fl n | | 212 | .It Fl n |
214 | Restrains | | 213 | Restrains |
215 | .Nm | | 214 | .Nm |
216 | from attempting | | 215 | from attempting |
217 | .Dq auto-login | | 216 | .Dq auto-login |
218 | upon initial connection for non auto-fetch transfers. | | 217 | upon initial connection for non auto-fetch transfers. |
219 | If auto-login is enabled, | | 218 | If auto-login is enabled, |
220 | .Nm | | 219 | .Nm |
221 | will check the | | 220 | will check the |
222 | .Pa .netrc | | 221 | .Pa .netrc |
223 | (see below) file in the user's home directory for an entry describing | | 222 | (see below) file in the user's home directory for an entry describing |
224 | an account on the remote machine. | | 223 | an account on the remote machine. |
225 | If no entry exists, | | 224 | If no entry exists, |
226 | .Nm | | 225 | .Nm |
227 | will prompt for the remote machine login name (default is the user | | 226 | will prompt for the remote machine login name (default is the user |
228 | identity on the local machine), and, if necessary, prompt for a password | | 227 | identity on the local machine), and, if necessary, prompt for a password |
229 | and an account with which to login. | | 228 | and an account with which to login. |
230 | To override the auto-login for auto-fetch transfers, specify the | | 229 | To override the auto-login for auto-fetch transfers, specify the |
231 | username (and optionally, password) as appropriate. | | 230 | username (and optionally, password) as appropriate. |
232 | .It Fl o Ar output | | 231 | .It Fl o Ar output |
233 | When auto-fetching files, save the contents in | | 232 | When auto-fetching files, save the contents in |
234 | .Ar output . | | 233 | .Ar output . |
235 | .Ar output | | 234 | .Ar output |
236 | is parsed according to the | | 235 | is parsed according to the |
237 | .Sx FILE NAMING CONVENTIONS | | 236 | .Sx FILE NAMING CONVENTIONS |
238 | below. | | 237 | below. |
239 | If | | 238 | If |
240 | .Ar output | | 239 | .Ar output |
241 | is not | | 240 | is not |
242 | .Sq - | | 241 | .Sq - |
243 | or doesn't start with | | 242 | or doesn't start with |
244 | .Sq \&| , | | 243 | .Sq \&| , |
245 | then only the first file specified will be retrieved into | | 244 | then only the first file specified will be retrieved into |
246 | .Ar output ; | | 245 | .Ar output ; |
247 | all other files will be retrieved into the basename of their | | 246 | all other files will be retrieved into the basename of their |
248 | remote name. | | 247 | remote name. |
249 | .It Fl P Ar port | | 248 | .It Fl P Ar port |
250 | Sets the port number to | | 249 | Sets the port number to |
251 | .Ar port . | | 250 | .Ar port . |
252 | .It Fl p | | 251 | .It Fl p |
253 | Enable passive mode operation for use behind connection filtering firewalls. | | 252 | Enable passive mode operation for use behind connection filtering firewalls. |
254 | This option has been deprecated as | | 253 | This option has been deprecated as |
255 | .Nm | | 254 | .Nm |
256 | now tries to use passive mode by default, falling back to active mode | | 255 | now tries to use passive mode by default, falling back to active mode |
257 | if the server does not support passive connections. | | 256 | if the server does not support passive connections. |
258 | .It Fl q Ar quittime | | 257 | .It Fl q Ar quittime |
259 | Quit if the connection has stalled for | | 258 | Quit if the connection has stalled for |
260 | .Ar quittime | | 259 | .Ar quittime |
261 | seconds. | | 260 | seconds. |
262 | .It Fl R | | 261 | .It Fl R |
263 | Restart all non-proxied auto-fetches. | | 262 | Restart all non-proxied auto-fetches. |
264 | .It Fl r Ar wait | | 263 | .It Fl r Ar wait |
265 | Retry the connection attempt if it failed, pausing for | | 264 | Retry the connection attempt if it failed, pausing for |
266 | .Ar wait | | 265 | .Ar wait |
267 | seconds. | | 266 | seconds. |
268 | .It Fl s Ar srcaddr | | 267 | .It Fl s Ar srcaddr |
269 | Uses | | 268 | Uses |
270 | .Ar srcaddr | | 269 | .Ar srcaddr |
271 | as the local IP address for all connections. | | 270 | as the local IP address for all connections. |
272 | .It Fl t | | 271 | .It Fl t |
273 | Enables packet tracing. | | 272 | Enables packet tracing. |
274 | .It Fl T Ar direction Ns , Ns Ar maximum Ns Oo , Ns Ar increment Oc | | 273 | .It Fl T Ar direction Ns , Ns Ar maximum Ns Oo , Ns Ar increment Oc |
275 | Set the maximum transfer rate for | | 274 | Set the maximum transfer rate for |
276 | .Ar direction | | 275 | .Ar direction |
277 | to | | 276 | to |
278 | .Ar maximum | | 277 | .Ar maximum |
279 | bytes/second, | | 278 | bytes/second, |
280 | and if specified, the increment to | | 279 | and if specified, the increment to |
281 | .Ar increment | | 280 | .Ar increment |
282 | bytes/second. | | 281 | bytes/second. |
283 | Refer to | | 282 | Refer to |
284 | .Ic rate | | 283 | .Ic rate |
285 | for more information. | | 284 | for more information. |
286 | .It Fl u Ar url file Op \&.\&.\&. | | 285 | .It Fl u Ar url Ar |
287 | Upload files on the command line to | | 286 | Upload files on the command line to |
288 | .Ar url | | 287 | .Ar url |
289 | where | | 288 | where |
290 | .Ar url | | 289 | .Ar url |
291 | is one of the ftp URL types as supported by auto-fetch | | 290 | is one of the ftp URL types as supported by auto-fetch |
292 | (with an optional target filename for single file uploads), and | | 291 | (with an optional target filename for single file uploads), and |
293 | .Ar file | | 292 | .Ar file |
294 | is one or more local files to be uploaded. | | 293 | is one or more local files to be uploaded. |
295 | .It Fl V | | 294 | .It Fl V |
296 | Disable | | 295 | Disable |
297 | .Ic verbose | | 296 | .Ic verbose |
298 | and | | 297 | and |
299 | .Ic progress , | | 298 | .Ic progress , |
300 | overriding the default of enabled when output is to a terminal. | | 299 | overriding the default of enabled when output is to a terminal. |
301 | .It Fl v | | 300 | .It Fl v |
302 | Enable | | 301 | Enable |
303 | .Ic verbose | | 302 | .Ic verbose |
304 | and | | 303 | and |
305 | .Ic progress . | | 304 | .Ic progress . |
306 | This is the default if output is to a terminal (and in the case of | | 305 | This is the default if output is to a terminal (and in the case of |
307 | .Ic progress , | | 306 | .Ic progress , |
308 | .Nm | | 307 | .Nm |
309 | is the foreground process). | | 308 | is the foreground process). |
310 | Forces | | 309 | Forces |
311 | .Nm | | 310 | .Nm |
312 | to show all responses from the remote server, as well | | 311 | to show all responses from the remote server, as well |
313 | as report on data transfer statistics. | | 312 | as report on data transfer statistics. |
314 | .It Fl x Ar xfersize | | 313 | .It Fl x Ar xfersize |
315 | Set the size of the socket send and receive buffers to | | 314 | Set the size of the socket send and receive buffers to |
316 | .Ar xfersize . | | 315 | .Ar xfersize . |
317 | Refer to | | 316 | Refer to |
318 | .Ic xferbuf | | 317 | .Ic xferbuf |
319 | for more information. | | 318 | for more information. |
320 | .El | | 319 | .El |
321 | .Pp | | 320 | .Pp |
322 | The client host with which | | 321 | The client host with which |
323 | .Nm | | 322 | .Nm |
324 | is to communicate may be specified on the command line. | | 323 | is to communicate may be specified on the command line. |
325 | If this is done, | | 324 | If this is done, |
326 | .Nm | | 325 | .Nm |
327 | will immediately attempt to establish a connection to an | | 326 | will immediately attempt to establish a connection to an |
328 | .Tn FTP | | 327 | .Tn FTP |
329 | server on that host; otherwise, | | 328 | server on that host; otherwise, |
330 | .Nm | | 329 | .Nm |
331 | will enter its command interpreter and await instructions | | 330 | will enter its command interpreter and await instructions |
332 | from the user. | | 331 | from the user. |
333 | When | | 332 | When |
334 | .Nm | | 333 | .Nm |
335 | is awaiting commands from the user the prompt | | 334 | is awaiting commands from the user the prompt |
336 | .Ql ftp> | | 335 | .Ql ftp> |
337 | is provided to the user. | | 336 | is provided to the user. |
338 | The following commands are recognized | | 337 | The following commands are recognized |
339 | by | | 338 | by |
340 | .Nm ftp : | | 339 | .Nm ftp : |
341 | .Bl -tag -width Ic | | 340 | .Bl -tag -width Ic |
342 | .It Ic \&! Op Ar command Op Ar args | | 341 | .It Ic \&! Op Ar command Op Ar args |
343 | Invoke an interactive shell on the local machine. | | 342 | Invoke an interactive shell on the local machine. |
344 | If there are arguments, the first is taken to be a command to execute | | 343 | If there are arguments, the first is taken to be a command to execute |
345 | directly, with the rest of the arguments as its arguments. | | 344 | directly, with the rest of the arguments as its arguments. |
346 | .It Ic \&$ Ar macro-name Op Ar args | | 345 | .It Ic \&$ Ar macro-name Op Ar args |
347 | Execute the macro | | 346 | Execute the macro |
348 | .Ar macro-name | | 347 | .Ar macro-name |
349 | that was defined with the | | 348 | that was defined with the |
350 | .Ic macdef | | 349 | .Ic macdef |
351 | command. | | 350 | command. |
352 | Arguments are passed to the macro unglobbed. | | 351 | Arguments are passed to the macro unglobbed. |
353 | .It Ic account Op Ar passwd | | 352 | .It Ic account Op Ar passwd |
354 | Supply a supplemental password required by a remote system for access | | 353 | Supply a supplemental password required by a remote system for access |
355 | to resources once a login has been successfully completed. | | 354 | to resources once a login has been successfully completed. |
356 | If no argument is included, the user will be prompted for an account | | 355 | If no argument is included, the user will be prompted for an account |
357 | password in a non-echoing input mode. | | 356 | password in a non-echoing input mode. |
358 | .It Ic append Ar local-file Op Ar remote-file | | 357 | .It Ic append Ar local-file Op Ar remote-file |
359 | Append a local file to a file on the remote machine. | | 358 | Append a local file to a file on the remote machine. |
360 | If | | 359 | If |
361 | .Ar remote-file | | 360 | .Ar remote-file |
362 | is left unspecified, the local file name is used in naming the | | 361 | is left unspecified, the local file name is used in naming the |
363 | remote file after being altered by any | | 362 | remote file after being altered by any |
364 | .Ic ntrans | | 363 | .Ic ntrans |
365 | or | | 364 | or |
366 | .Ic nmap | | 365 | .Ic nmap |
367 | setting. | | 366 | setting. |
368 | File transfer uses the current settings for | | 367 | File transfer uses the current settings for |
369 | .Ic type , | | 368 | .Ic type , |
370 | .Ic format , | | 369 | .Ic format , |
371 | .Ic mode , | | 370 | .Ic mode , |
372 | and | | 371 | and |
373 | .Ic structure . | | 372 | .Ic structure . |
374 | .It Ic ascii | | 373 | .It Ic ascii |
375 | Set the file transfer | | 374 | Set the file transfer |
376 | .Ic type | | 375 | .Ic type |
377 | to network | | 376 | to network |
378 | .Tn ASCII . | | 377 | .Tn ASCII . |
379 | This is the default type. | | 378 | This is the default type. |
380 | .It Ic bell | | 379 | .It Ic bell |
381 | Arrange that a bell be sounded after each file transfer | | 380 | Arrange that a bell be sounded after each file transfer |
382 | command is completed. | | 381 | command is completed. |
383 | .It Ic binary | | 382 | .It Ic binary |
384 | Set the file transfer | | 383 | Set the file transfer |
385 | .Ic type | | 384 | .Ic type |
386 | to support binary image transfer. | | 385 | to support binary image transfer. |
387 | .It Ic bye | | 386 | .It Ic bye |
388 | Terminate the | | 387 | Terminate the |
389 | .Tn FTP | | 388 | .Tn FTP |
390 | session with the remote server | | 389 | session with the remote server |
391 | and exit | | 390 | and exit |
392 | .Nm ftp . | | 391 | .Nm ftp . |
393 | An end of file will also terminate the session and exit. | | 392 | An end of file will also terminate the session and exit. |
394 | .It Ic case | | 393 | .It Ic case |
395 | Toggle remote computer file name case mapping during | | 394 | Toggle remote computer file name case mapping during |
396 | .Ic get , | | 395 | .Ic get , |
397 | .Ic mget | | 396 | .Ic mget |
398 | and | | 397 | and |
399 | .Ic mput | | 398 | .Ic mput |
400 | commands. | | 399 | commands. |
401 | When | | 400 | When |
402 | .Ic case | | 401 | .Ic case |
403 | is on (default is off), remote computer file names with all letters in | | 402 | is on (default is off), remote computer file names with all letters in |
404 | upper case are written in the local directory with the letters mapped | | 403 | upper case are written in the local directory with the letters mapped |
405 | to lower case. | | 404 | to lower case. |
406 | .It Ic \&cd Ar remote-directory | | 405 | .It Ic \&cd Ar remote-directory |
407 | Change the working directory on the remote machine | | 406 | Change the working directory on the remote machine |
408 | to | | 407 | to |
409 | .Ar remote-directory . | | 408 | .Ar remote-directory . |
410 | .It Ic cdup | | 409 | .It Ic cdup |
411 | Change the remote machine working directory to the parent of the | | 410 | Change the remote machine working directory to the parent of the |
412 | current remote machine working directory. | | 411 | current remote machine working directory. |
413 | .It Ic chmod Ar mode remote-file | | 412 | .It Ic chmod Ar mode remote-file |
414 | Change the permission modes of the file | | 413 | Change the permission modes of the file |
415 | .Ar remote-file | | 414 | .Ar remote-file |
416 | on the remote | | 415 | on the remote |
417 | system to | | 416 | system to |
418 | .Ar mode . | | 417 | .Ar mode . |
419 | .It Ic close | | 418 | .It Ic close |
420 | Terminate the | | 419 | Terminate the |
421 | .Tn FTP | | 420 | .Tn FTP |
422 | session with the remote server, and | | 421 | session with the remote server, and |
423 | return to the command interpreter. | | 422 | return to the command interpreter. |
424 | Any defined macros are erased. | | 423 | Any defined macros are erased. |
425 | .It Ic \&cr | | 424 | .It Ic \&cr |
426 | Toggle carriage return stripping during | | 425 | Toggle carriage return stripping during |
427 | ascii type file retrieval. | | 426 | ascii type file retrieval. |
428 | Records are denoted by a carriage return/linefeed sequence | | 427 | Records are denoted by a carriage return/linefeed sequence |
429 | during ascii type file transfer. | | 428 | during ascii type file transfer. |
430 | When | | 429 | When |
431 | .Ic \&cr | | 430 | .Ic \&cr |
432 | is on (the default), carriage returns are stripped from this | | 431 | is on (the default), carriage returns are stripped from this |
433 | sequence to conform with the | | 432 | sequence to conform with the |
434 | .Ux | | 433 | .Ux |
435 | single linefeed record | | 434 | single linefeed record |
436 | delimiter. | | 435 | delimiter. |
437 | Records on | | 436 | Records on |
438 | .Pf non\- Ns Ux | | 437 | .Pf non\- Ns Ux |
439 | remote systems may contain single linefeeds; | | 438 | remote systems may contain single linefeeds; |
440 | when an ascii type transfer is made, these linefeeds may be | | 439 | when an ascii type transfer is made, these linefeeds may be |
441 | distinguished from a record delimiter only when | | 440 | distinguished from a record delimiter only when |
442 | .Ic \&cr | | 441 | .Ic \&cr |
443 | is off. | | 442 | is off. |
444 | .It Ic delete Ar remote-file | | 443 | .It Ic delete Ar remote-file |
445 | Delete the file | | 444 | Delete the file |
446 | .Ar remote-file | | 445 | .Ar remote-file |
447 | on the remote machine. | | 446 | on the remote machine. |
448 | .It Ic dir Op Ar remote-path Op Ar local-file | | 447 | .It Ic dir Op Ar remote-path Op Ar local-file |
449 | Print a listing of the contents of a | | 448 | Print a listing of the contents of a |
450 | directory on the remote machine. | | 449 | directory on the remote machine. |
451 | The listing includes any system-dependent information that the server | | 450 | The listing includes any system-dependent information that the server |
452 | chooses to include; for example, most | | 451 | chooses to include; for example, most |
453 | .Ux | | 452 | .Ux |
454 | systems will produce | | 453 | systems will produce |
455 | output from the command | | 454 | output from the command |
456 | .Ql ls \-l . | | 455 | .Ql ls \-l . |
457 | If | | 456 | If |
458 | .Ar remote-path | | 457 | .Ar remote-path |
459 | is left unspecified, the current working directory is used. | | 458 | is left unspecified, the current working directory is used. |
460 | If interactive prompting is on, | | 459 | If interactive prompting is on, |
461 | .Nm | | 460 | .Nm |
462 | will prompt the user to verify that the last argument is indeed the | | 461 | will prompt the user to verify that the last argument is indeed the |
463 | target local file for receiving | | 462 | target local file for receiving |
464 | .Ic dir | | 463 | .Ic dir |
465 | output. | | 464 | output. |
466 | If no local file is specified, or if | | 465 | If no local file is specified, or if |
467 | .Ar local-file | | 466 | .Ar local-file |
468 | is | | 467 | is |
469 | .Sq Fl , | | 468 | .Sq Fl , |
470 | the output is sent to the terminal. | | 469 | the output is sent to the terminal. |
471 | .It Ic disconnect | | 470 | .It Ic disconnect |
472 | A synonym for | | 471 | A synonym for |
473 | .Ic close . | | 472 | .Ic close . |
474 | .It Ic edit | | 473 | .It Ic edit |
475 | Toggle command line editing, and context sensitive command and file | | 474 | Toggle command line editing, and context sensitive command and file |
476 | completion. | | 475 | completion. |
477 | This is automatically enabled if input is from a terminal, and | | 476 | This is automatically enabled if input is from a terminal, and |
478 | disabled otherwise. | | 477 | disabled otherwise. |
479 | .It Ic epsv epsv4 epsv6 | | 478 | .It Ic epsv epsv4 epsv6 |
480 | Toggle the use of the extended | | 479 | Toggle the use of the extended |
481 | .Dv EPSV | | 480 | .Dv EPSV |
482 | and | | 481 | and |
483 | .Dv EPRT | | 482 | .Dv EPRT |
484 | commands on all IP, IPv4, and IPv6 connections respectively. | | 483 | commands on all IP, IPv4, and IPv6 connections respectively. |
485 | First try | | 484 | First try |
486 | .Dv EPSV / | | 485 | .Dv EPSV / |
487 | .Dv EPRT , | | 486 | .Dv EPRT , |
488 | and then | | 487 | and then |
489 | .Dv PASV / | | 488 | .Dv PASV / |
490 | .Dv PORT . | | 489 | .Dv PORT . |
491 | This is enabled by default. | | 490 | This is enabled by default. |
492 | If an extended command fails then this option will be temporarily | | 491 | If an extended command fails then this option will be temporarily |
493 | disabled for the duration of the current connection, or until | | 492 | disabled for the duration of the current connection, or until |
494 | .Ic epsv , | | 493 | .Ic epsv , |
495 | .Ic epsv4 , | | 494 | .Ic epsv4 , |
496 | or | | 495 | or |
497 | .Ic epsv6 | | 496 | .Ic epsv6 |
498 | is executed again. | | 497 | is executed again. |
499 | .It Ic exit | | 498 | .It Ic exit |
500 | A synonym for | | 499 | A synonym for |
501 | .Ic bye . | | 500 | .Ic bye . |
502 | .It Ic features | | 501 | .It Ic features |
503 | Display what features the remote server supports (using the | | 502 | Display what features the remote server supports (using the |
504 | .Dv FEAT | | 503 | .Dv FEAT |
505 | command). | | 504 | command). |
506 | .It Ic fget Ar localfile | | 505 | .It Ic fget Ar localfile |
507 | Retrieve the files listed in | | 506 | Retrieve the files listed in |
508 | .Ar localfile , | | 507 | .Ar localfile , |
509 | which has one line per filename. | | 508 | which has one line per filename. |
510 | .It Ic form Ar format | | 509 | .It Ic form Ar format |
511 | Set the file transfer | | 510 | Set the file transfer |
512 | .Ic form | | 511 | .Ic form |
513 | to | | 512 | to |
514 | .Ar format . | | 513 | .Ar format . |
515 | The default (and only supported) | | 514 | The default (and only supported) |
516 | format is | | 515 | format is |
517 | .Dq non-print . | | 516 | .Dq non-print . |
518 | .It Ic ftp Ar host Op Ar port | | 517 | .It Ic ftp Ar host Op Ar port |
519 | A synonym for | | 518 | A synonym for |
520 | .Ic open . | | 519 | .Ic open . |
521 | .It Ic ftp_debug Op Ar ftp_debug-value | | 520 | .It Ic ftp_debug Op Ar ftp_debug-value |
522 | Toggle debugging mode. | | 521 | Toggle debugging mode. |
523 | If an optional | | 522 | If an optional |
524 | .Ar ftp_debug-value | | 523 | .Ar ftp_debug-value |
525 | is specified it is used to set the debugging level. | | 524 | is specified it is used to set the debugging level. |
526 | When debugging is on, | | 525 | When debugging is on, |
527 | .Nm | | 526 | .Nm |
528 | prints each command sent to the remote machine, preceded | | 527 | prints each command sent to the remote machine, preceded |
529 | by the string | | 528 | by the string |
530 | .Ql \-\-> . | | 529 | .Ql \-\-> . |
531 | .It Ic gate Op Ar host Op Ar port | | 530 | .It Ic gate Op Ar host Op Ar port |
532 | Toggle gate-ftp mode, which used to connect through the | | 531 | Toggle gate-ftp mode, which used to connect through the |
533 | TIS FWTK and Gauntlet ftp proxies. | | 532 | TIS FWTK and Gauntlet ftp proxies. |
534 | This will not be permitted if the gate-ftp server hasn't been set | | 533 | This will not be permitted if the gate-ftp server hasn't been set |
535 | (either explicitly by the user, or from the | | 534 | (either explicitly by the user, or from the |
536 | .Ev FTPSERVER | | 535 | .Ev FTPSERVER |
537 | environment variable). | | 536 | environment variable). |
538 | If | | 537 | If |
539 | .Ar host | | 538 | .Ar host |
540 | is given, | | 539 | is given, |
541 | then gate-ftp mode will be enabled, and the gate-ftp server will be set to | | 540 | then gate-ftp mode will be enabled, and the gate-ftp server will be set to |
542 | .Ar host . | | 541 | .Ar host . |
543 | If | | 542 | If |
544 | .Ar port | | 543 | .Ar port |
545 | is also given, that will be used as the port to connect to on the | | 544 | is also given, that will be used as the port to connect to on the |
546 | gate-ftp server. | | 545 | gate-ftp server. |
547 | .It Ic get Ar remote-file Op Ar local-file | | 546 | .It Ic get Ar remote-file Op Ar local-file |
548 | Retrieve the | | 547 | Retrieve the |
549 | .Ar remote-file | | 548 | .Ar remote-file |
550 | and store it on the local machine. | | 549 | and store it on the local machine. |
551 | If the local | | 550 | If the local |
552 | file name is not specified, it is given the same | | 551 | file name is not specified, it is given the same |
553 | name it has on the remote machine, subject to | | 552 | name it has on the remote machine, subject to |
554 | alteration by the current | | 553 | alteration by the current |
555 | .Ic case , | | 554 | .Ic case , |
556 | .Ic ntrans , | | 555 | .Ic ntrans , |
557 | and | | 556 | and |
558 | .Ic nmap | | 557 | .Ic nmap |
559 | settings. | | 558 | settings. |
560 | The current settings for | | 559 | The current settings for |
561 | .Ic type , | | 560 | .Ic type , |
562 | .Ic form , | | 561 | .Ic form , |
563 | .Ic mode , | | 562 | .Ic mode , |
564 | and | | 563 | and |
565 | .Ic structure | | 564 | .Ic structure |
566 | are used while transferring the file. | | 565 | are used while transferring the file. |
567 | .It Ic glob | | 566 | .It Ic glob |
568 | Toggle filename expansion for | | 567 | Toggle filename expansion for |
569 | .Ic mdelete , | | 568 | .Ic mdelete , |
570 | .Ic mget , | | 569 | .Ic mget , |
571 | .Ic mput , | | 570 | .Ic mput , |
572 | and | | 571 | and |
573 | .Ic mreget . | | 572 | .Ic mreget . |
574 | If globbing is turned off with | | 573 | If globbing is turned off with |
575 | .Ic glob , | | 574 | .Ic glob , |
576 | the file name arguments | | 575 | the file name arguments |
577 | are taken literally and not expanded. | | 576 | are taken literally and not expanded. |
578 | Globbing for | | 577 | Globbing for |
579 | .Ic mput | | 578 | .Ic mput |
580 | is done as in | | 579 | is done as in |
581 | .Xr csh 1 . | | 580 | .Xr csh 1 . |
582 | For | | 581 | For |
583 | .Ic mdelete , | | 582 | .Ic mdelete , |
584 | .Ic mget , | | 583 | .Ic mget , |
585 | and | | 584 | and |
586 | .Ic mreget , | | 585 | .Ic mreget , |
587 | each remote file name is expanded | | 586 | each remote file name is expanded |
588 | separately on the remote machine and the lists are not merged. | | 587 | separately on the remote machine and the lists are not merged. |
589 | Expansion of a directory name is likely to be | | 588 | Expansion of a directory name is likely to be |
590 | different from expansion of the name of an ordinary file: | | 589 | different from expansion of the name of an ordinary file: |
591 | the exact result depends on the foreign operating system and ftp server, | | 590 | the exact result depends on the foreign operating system and ftp server, |
592 | and can be previewed by doing | | 591 | and can be previewed by doing |
593 | .Ql mls remote-files \- | | 592 | .Ql mls remote-files \- |
594 | Note: | | 593 | Note: |
595 | .Ic mget , | | 594 | .Ic mget , |
596 | .Ic mput | | 595 | .Ic mput |
597 | and | | 596 | and |
598 | .Ic mreget | | 597 | .Ic mreget |
599 | are not meant to transfer | | 598 | are not meant to transfer |
600 | entire directory subtrees of files. | | 599 | entire directory subtrees of files. |
601 | That can be done by | | 600 | That can be done by |
602 | transferring a | | 601 | transferring a |
603 | .Xr tar 1 | | 602 | .Xr tar 1 |
604 | archive of the subtree (in binary mode). | | 603 | archive of the subtree (in binary mode). |
605 | .It Ic hash Op Ar size | | 604 | .It Ic hash Op Ar size |
606 | Toggle hash-sign | | 605 | Toggle hash-sign |
607 | .Pq Sq # | | 606 | .Pq Sq # |
608 | printing for each data block transferred. | | 607 | printing for each data block transferred. |
609 | The size of a data block defaults to 1024 bytes. | | 608 | The size of a data block defaults to 1024 bytes. |
610 | This can be changed by specifying | | 609 | This can be changed by specifying |
611 | .Ar size | | 610 | .Ar size |
612 | in bytes. | | 611 | in bytes. |
613 | Enabling | | 612 | Enabling |
614 | .Ic hash | | 613 | .Ic hash |
615 | disables | | 614 | disables |
616 | .Ic progress . | | 615 | .Ic progress . |
617 | .It Ic help Op Ar command | | 616 | .It Ic help Op Ar command |
618 | Print an informative message about the meaning of | | 617 | Print an informative message about the meaning of |
619 | .Ar command . | | 618 | .Ar command . |
620 | If no argument is given, | | 619 | If no argument is given, |
621 | .Nm | | 620 | .Nm |
622 | prints a list of the known commands. | | 621 | prints a list of the known commands. |
623 | .It Ic idle Op Ar seconds | | 622 | .It Ic idle Op Ar seconds |
624 | Set the inactivity timer on the remote server to | | 623 | Set the inactivity timer on the remote server to |
625 | .Ar seconds | | 624 | .Ar seconds |
626 | seconds. | | 625 | seconds. |
627 | If | | 626 | If |
628 | .Ar seconds | | 627 | .Ar seconds |
629 | is omitted, the current inactivity timer is printed. | | 628 | is omitted, the current inactivity timer is printed. |
630 | .It Ic image | | 629 | .It Ic image |
631 | A synonym for | | 630 | A synonym for |
632 | .Ic binary . | | 631 | .Ic binary . |
633 | .It Ic lcd Op Ar directory | | 632 | .It Ic lcd Op Ar directory |
634 | Change the working directory on the local machine. | | 633 | Change the working directory on the local machine. |
635 | If | | 634 | If |
636 | no | | 635 | no |
637 | .Ar directory | | 636 | .Ar directory |
638 | is specified, the user's home directory is used. | | 637 | is specified, the user's home directory is used. |
639 | .It Ic less Ar file | | 638 | .It Ic less Ar file |
640 | A synonym for | | 639 | A synonym for |
641 | .Ic page . | | 640 | .Ic page . |
642 | .It Ic lpage Ar local-file | | 641 | .It Ic lpage Ar local-file |
643 | Display | | 642 | Display |
644 | .Ar local-file | | 643 | .Ar local-file |
645 | with the program specified by the | | 644 | with the program specified by the |
646 | .Ic "set pager" | | 645 | .Ic "set pager" |
647 | option. | | 646 | option. |
648 | .It Ic lpwd | | 647 | .It Ic lpwd |
649 | Print the working directory on the local machine. | | 648 | Print the working directory on the local machine. |
650 | .It Ic \&ls Op Ar remote-path Op Ar local-file | | 649 | .It Ic \&ls Op Ar remote-path Op Ar local-file |
651 | A synonym for | | 650 | A synonym for |
652 | .Ic dir . | | 651 | .Ic dir . |
653 | .It Ic macdef Ar macro-name | | 652 | .It Ic macdef Ar macro-name |
654 | Define a macro. | | 653 | Define a macro. |
655 | Subsequent lines are stored as the macro | | 654 | Subsequent lines are stored as the macro |
656 | .Ar macro-name ; | | 655 | .Ar macro-name ; |
657 | a null line (consecutive newline characters in a file or carriage | | 656 | a null line (consecutive newline characters in a file or carriage |
658 | returns from the terminal) terminates macro input mode. | | 657 | returns from the terminal) terminates macro input mode. |
659 | There is a limit of 16 macros and 4096 total characters in all | | 658 | There is a limit of 16 macros and 4096 total characters in all |
660 | defined macros. | | 659 | defined macros. |
661 | Macro names can be a maximum of 8 characters. | | 660 | Macro names can be a maximum of 8 characters. |
662 | Macros are only applicable to the current session they are | | 661 | Macros are only applicable to the current session they are |
663 | defined within (or if defined outside a session, to the session | | 662 | defined within (or if defined outside a session, to the session |
664 | invoked with the next | | 663 | invoked with the next |
665 | .Ic open | | 664 | .Ic open |
666 | command), and remain defined until a | | 665 | command), and remain defined until a |
667 | .Ic close | | 666 | .Ic close |
668 | command is executed. | | 667 | command is executed. |
669 | To invoke a macro, use the | | 668 | To invoke a macro, use the |
670 | .Ic $ | | 669 | .Ic $ |
671 | command (see above). | | 670 | command (see above). |
672 | .Pp | | 671 | .Pp |
673 | The macro processor interprets | | 672 | The macro processor interprets |
674 | .Sq $ | | 673 | .Sq $ |
675 | and | | 674 | and |
676 | .Sq \e | | 675 | .Sq \e |
677 | as special characters. | | 676 | as special characters. |
678 | A | | 677 | A |
679 | .Sq $ | | 678 | .Sq $ |
680 | followed by a number (or numbers) is replaced by the | | 679 | followed by a number (or numbers) is replaced by the |
681 | corresponding argument on the macro invocation command line. | | 680 | corresponding argument on the macro invocation command line. |
682 | A | | 681 | A |
683 | .Sq $ | | 682 | .Sq $ |
684 | followed by an | | 683 | followed by an |
685 | .Sq i | | 684 | .Sq i |
686 | signals the macro processor that the executing macro is to be | | 685 | signals the macro processor that the executing macro is to be |
687 | looped. | | 686 | looped. |
688 | On the first pass | | 687 | On the first pass |
689 | .Dq $i | | 688 | .Dq $i |
690 | is replaced by the first argument on the macro invocation command | | 689 | is replaced by the first argument on the macro invocation command |
691 | line, on the second pass it is replaced by the second argument, | | 690 | line, on the second pass it is replaced by the second argument, |
692 | and so on. | | 691 | and so on. |
693 | A | | 692 | A |
694 | .Sq \e | | 693 | .Sq \e |
695 | followed by any character is replaced by that character. | | 694 | followed by any character is replaced by that character. |
696 | Use the | | 695 | Use the |
697 | .Sq \e | | 696 | .Sq \e |
698 | to prevent special treatment of the | | 697 | to prevent special treatment of the |
699 | .Sq $ . | | 698 | .Sq $ . |
700 | .It Ic mdelete Op Ar remote-files | | 699 | .It Ic mdelete Op Ar remote-files |
701 | Delete the | | 700 | Delete the |
702 | .Ar remote-files | | 701 | .Ar remote-files |
703 | on the remote machine. | | 702 | on the remote machine. |
704 | .It Ic mdir Ar remote-files local-file | | 703 | .It Ic mdir Ar remote-files local-file |
705 | Like | | 704 | Like |
706 | .Ic dir , | | 705 | .Ic dir , |
707 | except multiple remote files may be specified. | | 706 | except multiple remote files may be specified. |
708 | If interactive prompting is on, | | 707 | If interactive prompting is on, |
709 | .Nm | | 708 | .Nm |
710 | will prompt the user to verify that the last argument is indeed the | | 709 | will prompt the user to verify that the last argument is indeed the |
711 | target local file for receiving | | 710 | target local file for receiving |
712 | .Ic mdir | | 711 | .Ic mdir |
713 | output. | | 712 | output. |
714 | .It Ic mget Ar remote-files | | 713 | .It Ic mget Ar remote-files |
715 | Expand the | | 714 | Expand the |
716 | .Ar remote-files | | 715 | .Ar remote-files |
717 | on the remote machine | | 716 | on the remote machine |
718 | and do a | | 717 | and do a |
719 | .Ic get | | 718 | .Ic get |
720 | for each file name thus produced. | | 719 | for each file name thus produced. |
721 | See | | 720 | See |
722 | .Ic glob | | 721 | .Ic glob |
723 | for details on the filename expansion. | | 722 | for details on the filename expansion. |
724 | Resulting file names will then be processed according to | | 723 | Resulting file names will then be processed according to |
725 | .Ic case , | | 724 | .Ic case , |
726 | .Ic ntrans , | | 725 | .Ic ntrans , |
727 | and | | 726 | and |
728 | .Ic nmap | | 727 | .Ic nmap |
729 | settings. | | 728 | settings. |
730 | Files are transferred into the local working directory, | | 729 | Files are transferred into the local working directory, |
731 | which can be changed with | | 730 | which can be changed with |
732 | .Ql lcd directory ; | | 731 | .Ql lcd directory ; |
733 | new local directories can be created with | | 732 | new local directories can be created with |
734 | .Ql "\&! mkdir directory" . | | 733 | .Ql "\&! mkdir directory" . |
735 | .It Ic mkdir Ar directory-name | | 734 | .It Ic mkdir Ar directory-name |
736 | Make a directory on the remote machine. | | 735 | Make a directory on the remote machine. |
737 | .It Ic mls Ar remote-files local-file | | 736 | .It Ic mls Ar remote-files local-file |
738 | Like | | 737 | Like |
739 | .Ic ls , | | 738 | .Ic ls , |
740 | except multiple remote files may be specified, | | 739 | except multiple remote files may be specified, |
741 | and the | | 740 | and the |
742 | .Ar local-file | | 741 | .Ar local-file |
743 | must be specified. | | 742 | must be specified. |
744 | If interactive prompting is on, | | 743 | If interactive prompting is on, |
745 | .Nm | | 744 | .Nm |
746 | will prompt the user to verify that the last argument is indeed the | | 745 | will prompt the user to verify that the last argument is indeed the |
747 | target local file for receiving | | 746 | target local file for receiving |
748 | .Ic mls | | 747 | .Ic mls |
749 | output. | | 748 | output. |
750 | .It Ic mlsd Op Ar remote-path | | 749 | .It Ic mlsd Op Ar remote-path |
751 | Display the contents of | | 750 | Display the contents of |
752 | .Ar remote-path | | 751 | .Ar remote-path |
753 | (which should default to the current directory if not given) | | 752 | (which should default to the current directory if not given) |
754 | in a machine-parsable form, using | | 753 | in a machine-parsable form, using |
755 | .Dv MLSD . | | 754 | .Dv MLSD . |
756 | The format of display can be changed with | | 755 | The format of display can be changed with |
757 | .Sq "remopts mlst ..." . | | 756 | .Sq "remopts mlst ..." . |
758 | .It Ic mlst Op Ar remote-path | | 757 | .It Ic mlst Op Ar remote-path |
759 | Display the details about | | 758 | Display the details about |
760 | .Ar remote-path | | 759 | .Ar remote-path |
761 | (which should default to the current directory if not given) | | 760 | (which should default to the current directory if not given) |
762 | in a machine-parsable form, using | | 761 | in a machine-parsable form, using |
763 | .Dv MLST . | | 762 | .Dv MLST . |
764 | The format of display can be changed with | | 763 | The format of display can be changed with |
765 | .Sq "remopts mlst ..." . | | 764 | .Sq "remopts mlst ..." . |
766 | .It Ic mode Ar mode-name | | 765 | .It Ic mode Ar mode-name |
767 | Set the file transfer | | 766 | Set the file transfer |
768 | .Ic mode | | 767 | .Ic mode |
769 | to | | 768 | to |
770 | .Ar mode-name . | | 769 | .Ar mode-name . |
771 | The default (and only supported) | | 770 | The default (and only supported) |
772 | mode is | | 771 | mode is |
773 | .Dq stream . | | 772 | .Dq stream . |
774 | .It Ic modtime Ar remote-file | | 773 | .It Ic modtime Ar remote-file |
775 | Show the last modification time of the file on the remote machine, in | | 774 | Show the last modification time of the file on the remote machine, in |
776 | .Li RFC 2822 | | 775 | .Li RFC 2822 |
777 | format. | | 776 | format. |
778 | .It Ic more Ar file | | 777 | .It Ic more Ar file |
779 | A synonym for | | 778 | A synonym for |
780 | .Ic page . | | 779 | .Ic page . |
781 | .It Ic mput Ar local-files | | 780 | .It Ic mput Ar local-files |
782 | Expand wild cards in the list of local files given as arguments | | 781 | Expand wild cards in the list of local files given as arguments |
783 | and do a | | 782 | and do a |
784 | .Ic put | | 783 | .Ic put |
785 | for each file in the resulting list. | | 784 | for each file in the resulting list. |
786 | See | | 785 | See |
787 | .Ic glob | | 786 | .Ic glob |
788 | for details of filename expansion. | | 787 | for details of filename expansion. |
789 | Resulting file names will then be processed according to | | 788 | Resulting file names will then be processed according to |
790 | .Ic ntrans | | 789 | .Ic ntrans |
791 | and | | 790 | and |
792 | .Ic nmap | | 791 | .Ic nmap |
793 | settings. | | 792 | settings. |
794 | .It Ic mreget Ar remote-files | | 793 | .It Ic mreget Ar remote-files |
795 | As per | | 794 | As per |
796 | .Ic mget , | | 795 | .Ic mget , |
797 | but performs a | | 796 | but performs a |
798 | .Ic reget | | 797 | .Ic reget |
799 | instead of | | 798 | instead of |
800 | .Ic get . | | 799 | .Ic get . |
801 | .It Ic msend Ar local-files | | 800 | .It Ic msend Ar local-files |
802 | A synonym for | | 801 | A synonym for |
803 | .Ic mput . | | 802 | .Ic mput . |
804 | .It Ic newer Ar remote-file Op Ar local-file | | 803 | .It Ic newer Ar remote-file Op Ar local-file |
805 | Get the file only if the modification time of the remote file is more | | 804 | Get the file only if the modification time of the remote file is more |
806 | recent that the file on the current system. | | 805 | recent that the file on the current system. |
807 | If the file does not | | 806 | If the file does not |
808 | exist on the current system, the remote file is considered | | 807 | exist on the current system, the remote file is considered |
809 | .Ic newer . | | 808 | .Ic newer . |
810 | Otherwise, this command is identical to | | 809 | Otherwise, this command is identical to |
811 | .Ar get . | | 810 | .Ar get . |
812 | .It Ic nlist Op Ar remote-path Op Ar local-file | | 811 | .It Ic nlist Op Ar remote-path Op Ar local-file |
813 | A synonym for | | 812 | A synonym for |
814 | .Ic ls . | | 813 | .Ic ls . |
815 | .It Ic nmap Op Ar inpattern outpattern | | 814 | .It Ic nmap Op Ar inpattern outpattern |
816 | Set or unset the filename mapping mechanism. | | 815 | Set or unset the filename mapping mechanism. |
817 | If no arguments are specified, the filename mapping mechanism is unset. | | 816 | If no arguments are specified, the filename mapping mechanism is unset. |
818 | If arguments are specified, remote filenames are mapped during | | 817 | If arguments are specified, remote filenames are mapped during |
819 | .Ic mput | | 818 | .Ic mput |
820 | commands and | | 819 | commands and |
821 | .Ic put | | 820 | .Ic put |
822 | commands issued without a specified remote target filename. | | 821 | commands issued without a specified remote target filename. |
823 | If arguments are specified, local filenames are mapped during | | 822 | If arguments are specified, local filenames are mapped during |
824 | .Ic mget | | 823 | .Ic mget |
825 | commands and | | 824 | commands and |
826 | .Ic get | | 825 | .Ic get |
827 | commands issued without a specified local target filename. | | 826 | commands issued without a specified local target filename. |
828 | This command is useful when connecting to a | | 827 | This command is useful when connecting to a |
829 | .No non\- Ns Ux | | 828 | .No non\- Ns Ux |
830 | remote computer | | 829 | remote computer |
831 | with different file naming conventions or practices. | | 830 | with different file naming conventions or practices. |
832 | The mapping follows the pattern set by | | 831 | The mapping follows the pattern set by |
833 | .Ar inpattern | | 832 | .Ar inpattern |
834 | and | | 833 | and |
835 | .Ar outpattern . | | 834 | .Ar outpattern . |
836 | .Op Ar Inpattern | | 835 | .Op Ar Inpattern |
837 | is a template for incoming filenames (which may have already been | | 836 | is a template for incoming filenames (which may have already been |
838 | processed according to the | | 837 | processed according to the |
839 | .Ic ntrans | | 838 | .Ic ntrans |
840 | and | | 839 | and |
841 | .Ic case | | 840 | .Ic case |
842 | settings). | | 841 | settings). |
843 | Variable templating is accomplished by including the | | 842 | Variable templating is accomplished by including the |
844 | sequences | | 843 | sequences |
845 | .Dq $1 , | | 844 | .Dq $1 , |
846 | .Dq $2 , | | 845 | .Dq $2 , |
847 | \&... | | 846 | \&... |
848 | .Dq $9 | | 847 | .Dq $9 |
849 | in | | 848 | in |
850 | .Ar inpattern . | | 849 | .Ar inpattern . |
851 | Use | | 850 | Use |
852 | .Sq \e | | 851 | .Sq \e |
853 | to prevent this special treatment of the | | 852 | to prevent this special treatment of the |
854 | .Sq $ | | 853 | .Sq $ |
855 | character. | | 854 | character. |
856 | All other characters are treated literally, and are used to determine the | | 855 | All other characters are treated literally, and are used to determine the |
857 | .Ic nmap | | 856 | .Ic nmap |
858 | .Op Ar inpattern | | 857 | .Op Ar inpattern |
859 | variable values. | | 858 | variable values. |
860 | For example, given | | 859 | For example, given |
861 | .Ar inpattern | | 860 | .Ar inpattern |
862 | $1.$2 and the remote file name "mydata.data", $1 would have the value | | 861 | $1.$2 and the remote file name "mydata.data", $1 would have the value |
863 | "mydata", and $2 would have the value "data". | | 862 | "mydata", and $2 would have the value "data". |
864 | The | | 863 | The |
865 | .Ar outpattern | | 864 | .Ar outpattern |
866 | determines the resulting mapped filename. | | 865 | determines the resulting mapped filename. |
867 | The sequences | | 866 | The sequences |
868 | .Dq $1 , | | 867 | .Dq $1 , |
869 | .Dq $2 , | | 868 | .Dq $2 , |
870 | \&... | | 869 | \&... |
871 | .Dq $9 | | 870 | .Dq $9 |
872 | are replaced by any value resulting from the | | 871 | are replaced by any value resulting from the |
873 | .Ar inpattern | | 872 | .Ar inpattern |
874 | template. | | 873 | template. |
875 | The sequence | | 874 | The sequence |
876 | .Dq $0 | | 875 | .Dq $0 |
877 | is replaced by the original filename. | | 876 | is replaced by the original filename. |
878 | Additionally, the sequence | | 877 | Additionally, the sequence |
879 | .Dq Op Ar seq1 , Ar seq2 | | 878 | .Dq Op Ar seq1 , Ar seq2 |
880 | is replaced by | | 879 | is replaced by |
881 | .Op Ar seq1 | | 880 | .Op Ar seq1 |
882 | if | | 881 | if |
883 | .Ar seq1 | | 882 | .Ar seq1 |
884 | is not a null string; otherwise it is replaced by | | 883 | is not a null string; otherwise it is replaced by |
885 | .Ar seq2 . | | 884 | .Ar seq2 . |
886 | For example, the command | | 885 | For example, the command |
887 | .Pp | | 886 | .Pp |
888 | .Bd -literal -offset indent -compact | | 887 | .Bd -literal -offset indent -compact |
889 | nmap $1.$2.$3 [$1,$2].[$2,file] | | 888 | nmap $1.$2.$3 [$1,$2].[$2,file] |
890 | .Ed | | 889 | .Ed |
891 | .Pp | | 890 | .Pp |
892 | would yield | | 891 | would yield |
893 | the output filename "myfile.data" for input filenames "myfile.data" and | | 892 | the output filename "myfile.data" for input filenames "myfile.data" and |
894 | "myfile.data.old", "myfile.file" for the input filename "myfile", and | | 893 | "myfile.data.old", "myfile.file" for the input filename "myfile", and |
895 | "myfile.myfile" for the input filename ".myfile". | | 894 | "myfile.myfile" for the input filename ".myfile". |
896 | Spaces may be included in | | 895 | Spaces may be included in |
897 | .Ar outpattern , | | 896 | .Ar outpattern , |
898 | as in the example: | | 897 | as in the example: |
899 | .Dl nmap $1 sed "s/ *$//" > $1 | | 898 | .Dl nmap $1 sed "s/ *$//" > $1 |
900 | Use the | | 899 | Use the |
901 | .Sq \e | | 900 | .Sq \e |
902 | character to prevent special treatment | | 901 | character to prevent special treatment |
903 | of the | | 902 | of the |
904 | .Sq $ , | | 903 | .Sq $ , |
905 | .Sq \&[ , | | 904 | .Sq \&[ , |
906 | .Sq \&] , | | 905 | .Sq \&] , |
907 | and | | 906 | and |
908 | .Sq \&, | | 907 | .Sq \&, |
909 | characters. | | 908 | characters. |
910 | .It Ic ntrans Op Ar inchars Op Ar outchars | | 909 | .It Ic ntrans Op Ar inchars Op Ar outchars |
911 | Set or unset the filename character translation mechanism. | | 910 | Set or unset the filename character translation mechanism. |
912 | If no arguments are specified, the filename character | | 911 | If no arguments are specified, the filename character |
913 | translation mechanism is unset. | | 912 | translation mechanism is unset. |
914 | If arguments are specified, characters in | | 913 | If arguments are specified, characters in |
915 | remote filenames are translated during | | 914 | remote filenames are translated during |
916 | .Ic mput | | 915 | .Ic mput |
917 | commands and | | 916 | commands and |
918 | .Ic put | | 917 | .Ic put |
919 | commands issued without a specified remote target filename. | | 918 | commands issued without a specified remote target filename. |
920 | If arguments are specified, characters in | | 919 | If arguments are specified, characters in |
921 | local filenames are translated during | | 920 | local filenames are translated during |
922 | .Ic mget | | 921 | .Ic mget |
923 | commands and | | 922 | commands and |
924 | .Ic get | | 923 | .Ic get |
925 | commands issued without a specified local target filename. | | 924 | commands issued without a specified local target filename. |
926 | This command is useful when connecting to a | | 925 | This command is useful when connecting to a |
927 | .No non\- Ns Ux | | 926 | .No non\- Ns Ux |
928 | remote computer | | 927 | remote computer |
929 | with different file naming conventions or practices. | | 928 | with different file naming conventions or practices. |
930 | Characters in a filename matching a character in | | 929 | Characters in a filename matching a character in |
931 | .Ar inchars | | 930 | .Ar inchars |
932 | are replaced with the corresponding character in | | 931 | are replaced with the corresponding character in |
933 | .Ar outchars . | | 932 | .Ar outchars . |
934 | If the character's position in | | 933 | If the character's position in |
935 | .Ar inchars | | 934 | .Ar inchars |
936 | is longer than the length of | | 935 | is longer than the length of |
937 | .Ar outchars , | | 936 | .Ar outchars , |
938 | the character is deleted from the file name. | | 937 | the character is deleted from the file name. |
939 | .It Ic open Ar host Op Ar port | | 938 | .It Ic open Ar host Op Ar port |
940 | Establish a connection to the specified | | 939 | Establish a connection to the specified |
941 | .Ar host | | 940 | .Ar host |
942 | .Tn FTP | | 941 | .Tn FTP |
943 | server. | | 942 | server. |
944 | An optional port number may be supplied, | | 943 | An optional port number may be supplied, |
945 | in which case, | | 944 | in which case, |
946 | .Nm | | 945 | .Nm |
947 | will attempt to contact an | | 946 | will attempt to contact an |
948 | .Tn FTP | | 947 | .Tn FTP |
949 | server at that port. | | 948 | server at that port. |
950 | If the | | 949 | If the |
951 | .Ic "set auto-login" | | 950 | .Ic "set auto-login" |
952 | option is on (default), | | 951 | option is on (default), |
953 | .Nm | | 952 | .Nm |
954 | will also attempt to automatically log the user in to | | 953 | will also attempt to automatically log the user in to |
955 | the | | 954 | the |
956 | .Tn FTP | | 955 | .Tn FTP |
957 | server (see below). | | 956 | server (see below). |
958 | .It Ic page Ar file | | 957 | .It Ic page Ar file |
959 | Retrieve | | 958 | Retrieve |
960 | .Ic file | | 959 | .Ic file |
961 | and display with the program specified by the | | 960 | and display with the program specified by the |
962 | .Ic "set pager" | | 961 | .Ic "set pager" |
963 | option. | | 962 | option. |
964 | .It Ic passive Op Cm auto | | 963 | .It Ic passive Op Cm auto |
965 | Toggle passive mode (if no arguments are given). | | 964 | Toggle passive mode (if no arguments are given). |
966 | If | | 965 | If |
967 | .Cm auto | | 966 | .Cm auto |
968 | is given, act as if | | 967 | is given, act as if |
969 | .Ev FTPMODE | | 968 | .Ev FTPMODE |
970 | is set to | | 969 | is set to |
971 | .Sq auto . | | 970 | .Sq auto . |
972 | If passive mode is turned on (default), | | 971 | If passive mode is turned on (default), |
973 | .Nm | | 972 | .Nm |
974 | will send a | | 973 | will send a |
975 | .Dv PASV | | 974 | .Dv PASV |
976 | command for all data connections instead of a | | 975 | command for all data connections instead of a |
977 | .Dv PORT | | 976 | .Dv PORT |
978 | command. | | 977 | command. |
979 | The | | 978 | The |
980 | .Dv PASV | | 979 | .Dv PASV |
981 | command requests that the remote server open a port for the data connection | | 980 | command requests that the remote server open a port for the data connection |
982 | and return the address of that port. | | 981 | and return the address of that port. |
983 | The remote server listens on that port and the client connects to it. | | 982 | The remote server listens on that port and the client connects to it. |
984 | When using the more traditional | | 983 | When using the more traditional |
985 | .Dv PORT | | 984 | .Dv PORT |
986 | command, the client listens on a port and sends that address to the remote | | 985 | command, the client listens on a port and sends that address to the remote |
987 | server, who connects back to it. | | 986 | server, who connects back to it. |
988 | Passive mode is useful when using | | 987 | Passive mode is useful when using |
989 | .Nm | | 988 | .Nm |
990 | through a gateway router or host that controls the directionality of | | 989 | through a gateway router or host that controls the directionality of |
991 | traffic. | | 990 | traffic. |
992 | (Note that though | | 991 | (Note that though |
993 | .Tn FTP | | 992 | .Tn FTP |
994 | servers are required to support the | | 993 | servers are required to support the |
995 | .Dv PASV | | 994 | .Dv PASV |
996 | command by | | 995 | command by |
997 | .Li RFC 1123 , | | 996 | .Li RFC 1123 , |
998 | some do not.) | | 997 | some do not.) |
999 | .It Ic pdir Op Ar remote-path | | 998 | .It Ic pdir Op Ar remote-path |
1000 | Perform | | 999 | Perform |
1001 | .Ic dir | | 1000 | .Ic dir |
1002 | .Op Ar remote-path , | | 1001 | .Op Ar remote-path , |
1003 | and display the result with the program specified by the | | 1002 | and display the result with the program specified by the |
1004 | .Ic "set pager" | | 1003 | .Ic "set pager" |
1005 | option. | | 1004 | option. |
1006 | .It Ic pls Op Ar remote-path | | 1005 | .It Ic pls Op Ar remote-path |
1007 | Perform | | 1006 | Perform |
1008 | .Ic ls | | 1007 | .Ic ls |
1009 | .Op Ar remote-path , | | 1008 | .Op Ar remote-path , |
1010 | and display the result with the program specified by the | | 1009 | and display the result with the program specified by the |
1011 | .Ic "set pager" | | 1010 | .Ic "set pager" |
1012 | option. | | 1011 | option. |
1013 | .It Ic pmlsd Op Ar remote-path | | 1012 | .It Ic pmlsd Op Ar remote-path |
1014 | Perform | | 1013 | Perform |
1015 | .Ic mlsd | | 1014 | .Ic mlsd |
1016 | .Op Ar remote-path , | | 1015 | .Op Ar remote-path , |
1017 | and display the result with the program specified by the | | 1016 | and display the result with the program specified by the |
1018 | .Ic "set pager" | | 1017 | .Ic "set pager" |
1019 | option. | | 1018 | option. |
1020 | .It Ic preserve | | 1019 | .It Ic preserve |
1021 | Toggle preservation of modification times on retrieved files. | | 1020 | Toggle preservation of modification times on retrieved files. |
1022 | .It Ic progress | | 1021 | .It Ic progress |
1023 | Toggle display of transfer progress bar. | | 1022 | Toggle display of transfer progress bar. |
1024 | The progress bar will be disabled for a transfer that has | | 1023 | The progress bar will be disabled for a transfer that has |
1025 | .Ar local-file | | 1024 | .Ar local-file |
1026 | as | | 1025 | as |
1027 | .Sq Fl | | 1026 | .Sq Fl |
1028 | or a command that starts with | | 1027 | or a command that starts with |
1029 | .Sq \&| . | | 1028 | .Sq \&| . |
1030 | Refer to | | 1029 | Refer to |
1031 | .Sx FILE NAMING CONVENTIONS | | 1030 | .Sx FILE NAMING CONVENTIONS |
1032 | for more information. | | 1031 | for more information. |
1033 | Enabling | | 1032 | Enabling |
1034 | .Ic progress | | 1033 | .Ic progress |
1035 | disables | | 1034 | disables |
1036 | .Ic hash . | | 1035 | .Ic hash . |
1037 | .It Ic prompt | | 1036 | .It Ic prompt |
1038 | Toggle interactive prompting. | | 1037 | Toggle interactive prompting. |
1039 | Interactive prompting | | 1038 | Interactive prompting |
1040 | occurs during multiple file transfers to allow the | | 1039 | occurs during multiple file transfers to allow the |
1041 | user to selectively retrieve or store files. | | 1040 | user to selectively retrieve or store files. |
1042 | If prompting is turned off (default is on), any | | 1041 | If prompting is turned off (default is on), any |
1043 | .Ic mget | | 1042 | .Ic mget |
1044 | or | | 1043 | or |
1045 | .Ic mput | | 1044 | .Ic mput |
1046 | will transfer all files, and any | | 1045 | will transfer all files, and any |
1047 | .Ic mdelete | | 1046 | .Ic mdelete |
1048 | will delete all files. | | 1047 | will delete all files. |
1049 | .Pp | | 1048 | .Pp |
1050 | When prompting is on, the following commands are available at a prompt: | | 1049 | When prompting is on, the following commands are available at a prompt: |
1051 | .Bl -tag -width 2n -offset indent | | 1050 | .Bl -tag -width 2n -offset indent |
1052 | .It Cm a | | 1051 | .It Cm a |
1053 | Answer | | 1052 | Answer |
1054 | .Sq yes | | 1053 | .Sq yes |
1055 | to the current file, and automatically answer | | 1054 | to the current file, and automatically answer |
1056 | .Sq yes | | 1055 | .Sq yes |
1057 | to any remaining files for the current command. | | 1056 | to any remaining files for the current command. |
1058 | .It Cm n | | 1057 | .It Cm n |
1059 | Answer | | 1058 | Answer |
1060 | .Sq no , | | 1059 | .Sq no , |
1061 | and do not transfer the file. | | 1060 | and do not transfer the file. |
1062 | .It Cm p | | 1061 | .It Cm p |
1063 | Answer | | 1062 | Answer |
1064 | .Sq yes | | 1063 | .Sq yes |
1065 | to the current file, and turn off prompt mode | | 1064 | to the current file, and turn off prompt mode |
1066 | (as is | | 1065 | (as is |
1067 | .Dq prompt off | | 1066 | .Dq prompt off |
1068 | had been given). | | 1067 | had been given). |
1069 | .It Cm q | | 1068 | .It Cm q |
1070 | Terminate the current operation. | | 1069 | Terminate the current operation. |
1071 | .It Cm y | | 1070 | .It Cm y |
1072 | Answer | | 1071 | Answer |
1073 | .Sq yes , | | 1072 | .Sq yes , |
1074 | and transfer the file. | | 1073 | and transfer the file. |
1075 | .It Cm \&? | | 1074 | .It Cm \&? |
1076 | Display a help message. | | 1075 | Display a help message. |
1077 | .El | | 1076 | .El |
1078 | .Pp | | 1077 | .Pp |
1079 | Any other response will answer | | 1078 | Any other response will answer |
1080 | .Sq yes | | 1079 | .Sq yes |
1081 | to the current file. | | 1080 | to the current file. |
1082 | .It Ic proxy Ar ftp-command | | 1081 | .It Ic proxy Ar ftp-command |
1083 | Execute an ftp command on a secondary control connection. | | 1082 | Execute an ftp command on a secondary control connection. |
1084 | This command allows simultaneous connection to two remote | | 1083 | This command allows simultaneous connection to two remote |
1085 | .Tn FTP | | 1084 | .Tn FTP |
1086 | servers for transferring files between the two servers. | | 1085 | servers for transferring files between the two servers. |
1087 | The first | | 1086 | The first |
1088 | .Ic proxy | | 1087 | .Ic proxy |
1089 | command should be an | | 1088 | command should be an |
1090 | .Ic open , | | 1089 | .Ic open , |
1091 | to establish the secondary control connection. | | 1090 | to establish the secondary control connection. |
1092 | Enter the command "proxy ?" to see other | | 1091 | Enter the command "proxy ?" to see other |
1093 | .Tn FTP | | 1092 | .Tn FTP |
1094 | commands executable on the secondary connection. | | 1093 | commands executable on the secondary connection. |
1095 | The following commands behave differently when prefaced by | | 1094 | The following commands behave differently when prefaced by |
1096 | .Ic proxy : | | 1095 | .Ic proxy : |
1097 | .Ic open | | 1096 | .Ic open |
1098 | will not define new macros during the auto-login process, | | 1097 | will not define new macros during the auto-login process, |
1099 | .Ic close | | 1098 | .Ic close |
1100 | will not erase existing macro definitions, | | 1099 | will not erase existing macro definitions, |
1101 | .Ic get | | 1100 | .Ic get |
1102 | and | | 1101 | and |
1103 | .Ic mget | | 1102 | .Ic mget |
1104 | transfer files from the host on the primary control connection | | 1103 | transfer files from the host on the primary control connection |
1105 | to the host on the secondary control connection, and | | 1104 | to the host on the secondary control connection, and |
1106 | .Ic put , | | 1105 | .Ic put , |
1107 | .Ic mput , | | 1106 | .Ic mput , |
1108 | and | | 1107 | and |
1109 | .Ic append | | 1108 | .Ic append |
1110 | transfer files from the host on the secondary control connection | | 1109 | transfer files from the host on the secondary control connection |
1111 | to the host on the primary control connection. | | 1110 | to the host on the primary control connection. |
1112 | Third party file transfers depend upon support of the | | 1111 | Third party file transfers depend upon support of the |
1113 | .Tn FTP | | 1112 | .Tn FTP |
1114 | protocol | | 1113 | protocol |
1115 | .Dv PASV | | 1114 | .Dv PASV |
1116 | command by the server on the secondary control connection. | | 1115 | command by the server on the secondary control connection. |
1117 | .It Ic put Ar local-file Op Ar remote-file | | 1116 | .It Ic put Ar local-file Op Ar remote-file |
1118 | Store a local file on the remote machine. | | 1117 | Store a local file on the remote machine. |
1119 | If | | 1118 | If |
1120 | .Ar remote-file | | 1119 | .Ar remote-file |
1121 | is left unspecified, the local file name is used | | 1120 | is left unspecified, the local file name is used |
1122 | after processing according to any | | 1121 | after processing according to any |
1123 | .Ic ntrans | | 1122 | .Ic ntrans |
1124 | or | | 1123 | or |
1125 | .Ic nmap | | 1124 | .Ic nmap |
1126 | settings | | 1125 | settings |
1127 | in naming the remote file. | | 1126 | in naming the remote file. |
1128 | File transfer uses the | | 1127 | File transfer uses the |
1129 | current settings for | | 1128 | current settings for |
1130 | .Ic type , | | 1129 | .Ic type , |
1131 | .Ic format , | | 1130 | .Ic format , |
1132 | .Ic mode , | | 1131 | .Ic mode , |
1133 | and | | 1132 | and |
1134 | .Ic structure . | | 1133 | .Ic structure . |
1135 | .It Ic pwd | | 1134 | .It Ic pwd |
1136 | Print the name of the current working directory on the remote | | 1135 | Print the name of the current working directory on the remote |
1137 | machine. | | 1136 | machine. |
1138 | .It Ic quit | | 1137 | .It Ic quit |
1139 | A synonym for | | 1138 | A synonym for |
1140 | .Ic bye . | | 1139 | .Ic bye . |
1141 | .It Ic quote Ar arg1 arg2 ... | | 1140 | .It Ic quote Ar arg1 arg2 ... |
1142 | The arguments specified are sent, verbatim, to the remote | | 1141 | The arguments specified are sent, verbatim, to the remote |
1143 | .Tn FTP | | 1142 | .Tn FTP |
1144 | server. | | 1143 | server. |
1145 | .It Ic rate Ar direction Oo Ar maximum Oo Ar increment Oc Oc | | 1144 | .It Ic rate Ar direction Oo Ar maximum Oo Ar increment Oc Oc |
1146 | Throttle the maximum transfer rate to | | 1145 | Throttle the maximum transfer rate to |
1147 | .Ar maximum | | 1146 | .Ar maximum |
1148 | bytes/second. | | 1147 | bytes/second. |
1149 | If | | 1148 | If |
1150 | .Ar maximum | | 1149 | .Ar maximum |
1151 | is 0, disable the throttle. | | 1150 | is 0, disable the throttle. |
1152 | .Pp | | 1151 | .Pp |
1153 | .Ar direction | | 1152 | .Ar direction |
1154 | may be one of: | | 1153 | may be one of: |
1155 | .Bl -tag -width "all" -offset indent -compact | | 1154 | .Bl -tag -width "all" -offset indent -compact |
1156 | .It Cm all | | 1155 | .It Cm all |
1157 | Both directions. | | 1156 | Both directions. |
1158 | .It Cm get | | 1157 | .It Cm get |
1159 | Incoming transfers. | | 1158 | Incoming transfers. |
1160 | .It Cm put | | 1159 | .It Cm put |
1161 | Outgoing transfers. | | 1160 | Outgoing transfers. |
1162 | .El | | 1161 | .El |
1163 | .Pp | | 1162 | .Pp |
1164 | .Ar maximum | | 1163 | .Ar maximum |
1165 | can be modified on the fly by | | 1164 | can be modified on the fly by |
1166 | .Ar increment | | 1165 | .Ar increment |
1167 | bytes (default: 1024) each time a given signal is received: | | 1166 | bytes (default: 1024) each time a given signal is received: |
1168 | .Bl -tag -width "SIGUSR1" -offset indent | | 1167 | .Bl -tag -width "SIGUSR1" -offset indent |
1169 | .It Dv SIGUSR1 | | 1168 | .It Dv SIGUSR1 |
1170 | Increment | | 1169 | Increment |
1171 | .Ar maximum | | 1170 | .Ar maximum |
1172 | by | | 1171 | by |
1173 | .Ar increment | | 1172 | .Ar increment |
1174 | bytes. | | 1173 | bytes. |
1175 | .It Dv SIGUSR2 | | 1174 | .It Dv SIGUSR2 |
1176 | Decrement | | 1175 | Decrement |
1177 | .Ar maximum | | 1176 | .Ar maximum |
1178 | by | | 1177 | by |
1179 | .Ar increment | | 1178 | .Ar increment |
1180 | bytes. | | 1179 | bytes. |
1181 | The result must be a positive number. | | 1180 | The result must be a positive number. |
1182 | .El | | 1181 | .El |
1183 | .Pp | | 1182 | .Pp |
1184 | If | | 1183 | If |
1185 | .Ar maximum | | 1184 | .Ar maximum |
1186 | is not supplied, the current throttle rates are displayed. | | 1185 | is not supplied, the current throttle rates are displayed. |
1187 | .Pp | | 1186 | .Pp |
1188 | Note: | | 1187 | Note: |
1189 | .Ic rate | | 1188 | .Ic rate |
1190 | is not yet implemented for ascii mode transfers. | | 1189 | is not yet implemented for ascii mode transfers. |
1191 | .It Ic rcvbuf Ar size | | 1190 | .It Ic rcvbuf Ar size |
1192 | Set the size of the socket receive buffer to | | 1191 | Set the size of the socket receive buffer to |
1193 | .Ar size . | | 1192 | .Ar size . |
1194 | .It Ic recv Ar remote-file Op Ar local-file | | 1193 | .It Ic recv Ar remote-file Op Ar local-file |
1195 | A synonym for | | 1194 | A synonym for |
1196 | .Ic get . | | 1195 | .Ic get . |
1197 | .It Ic reget Ar remote-file Op Ar local-file | | 1196 | .It Ic reget Ar remote-file Op Ar local-file |
1198 | .Ic reget | | 1197 | .Ic reget |
1199 | acts like | | 1198 | acts like |
1200 | .Ic get , | | 1199 | .Ic get , |
1201 | except that if | | 1200 | except that if |
1202 | .Ar local-file | | 1201 | .Ar local-file |
1203 | exists and is | | 1202 | exists and is |
1204 | smaller than | | 1203 | smaller than |
1205 | .Ar remote-file , | | 1204 | .Ar remote-file , |
1206 | .Ar local-file | | 1205 | .Ar local-file |
1207 | is presumed to be | | 1206 | is presumed to be |
1208 | a partially transferred copy of | | 1207 | a partially transferred copy of |
1209 | .Ar remote-file | | 1208 | .Ar remote-file |
1210 | and the transfer | | 1209 | and the transfer |
1211 | is continued from the apparent point of failure. | | 1210 | is continued from the apparent point of failure. |
1212 | This command | | 1211 | This command |
1213 | is useful when transferring very large files over networks that | | 1212 | is useful when transferring very large files over networks that |
1214 | are prone to dropping connections. | | 1213 | are prone to dropping connections. |
1215 | .It Ic remopts Ar command Op Ar command-options | | 1214 | .It Ic remopts Ar command Op Ar command-options |
1216 | Set options on the remote | | 1215 | Set options on the remote |
1217 | .Tn FTP | | 1216 | .Tn FTP |
1218 | server for | | 1217 | server for |
1219 | .Ar command | | 1218 | .Ar command |
1220 | to | | 1219 | to |
1221 | .Ar command-options | | 1220 | .Ar command-options |
1222 | (whose absence is handled on a command-specific basis). | | 1221 | (whose absence is handled on a command-specific basis). |
1223 | Remote | | 1222 | Remote |
1224 | .Tn FTP | | 1223 | .Tn FTP |
1225 | commands known to support options include: | | 1224 | commands known to support options include: |
1226 | .Sq MLST | | 1225 | .Sq MLST |
1227 | (used for | | 1226 | (used for |
1228 | .Dv MLSD | | 1227 | .Dv MLSD |
1229 | and | | 1228 | and |
1230 | .Dv MLST ) . | | 1229 | .Dv MLST ) . |
1231 | .It Ic rename Op Ar from Op Ar to | | 1230 | .It Ic rename Op Ar from Op Ar to |
1232 | Rename the file | | 1231 | Rename the file |
1233 | .Ar from | | 1232 | .Ar from |
1234 | on the remote machine, to the file | | 1233 | on the remote machine, to the file |
1235 | .Ar to . | | 1234 | .Ar to . |
1236 | .It Ic reset | | 1235 | .It Ic reset |
1237 | Clear reply queue. | | 1236 | Clear reply queue. |
1238 | This command re-synchronizes command/reply sequencing with the remote | | 1237 | This command re-synchronizes command/reply sequencing with the remote |
1239 | .Tn FTP | | 1238 | .Tn FTP |
1240 | server. | | 1239 | server. |
1241 | Resynchronization may be necessary following a violation of the | | 1240 | Resynchronization may be necessary following a violation of the |
1242 | .Tn FTP | | 1241 | .Tn FTP |
1243 | protocol by the remote server. | | 1242 | protocol by the remote server. |
1244 | .It Ic restart Ar marker | | 1243 | .It Ic restart Ar marker |
1245 | Restart the immediately following | | 1244 | Restart the immediately following |
1246 | .Ic get | | 1245 | .Ic get |
1247 | or | | 1246 | or |
1248 | .Ic put | | 1247 | .Ic put |
1249 | at the | | 1248 | at the |
1250 | indicated | | 1249 | indicated |
1251 | .Ar marker . | | 1250 | .Ar marker . |
1252 | On | | 1251 | On |
1253 | .Ux | | 1252 | .Ux |
1254 | systems, marker is usually a byte | | 1253 | systems, marker is usually a byte |
1255 | offset into the file. | | 1254 | offset into the file. |
1256 | .It Ic rhelp Op Ar command-name | | 1255 | .It Ic rhelp Op Ar command-name |
1257 | Request help from the remote | | 1256 | Request help from the remote |
1258 | .Tn FTP | | 1257 | .Tn FTP |
1259 | server. | | 1258 | server. |
1260 | If a | | 1259 | If a |
1261 | .Ar command-name | | 1260 | .Ar command-name |
1262 | is specified it is supplied to the server as well. | | 1261 | is specified it is supplied to the server as well. |
1263 | .It Ic rmdir Ar directory-name | | 1262 | .It Ic rmdir Ar directory-name |
1264 | Delete a directory on the remote machine. | | 1263 | Delete a directory on the remote machine. |
1265 | .It Ic rstatus Op Ar remote-file | | 1264 | .It Ic rstatus Op Ar remote-file |
1266 | With no arguments, show status of remote machine. | | 1265 | With no arguments, show status of remote machine. |
1267 | If | | 1266 | If |
1268 | .Ar remote-file | | 1267 | .Ar remote-file |
1269 | is specified, show status of | | 1268 | is specified, show status of |
1270 | .Ar remote-file | | 1269 | .Ar remote-file |
1271 | on remote machine. | | 1270 | on remote machine. |
1272 | .It Ic runique | | 1271 | .It Ic runique |
1273 | Toggle storing of files on the local system with unique filenames. | | 1272 | Toggle storing of files on the local system with unique filenames. |
1274 | If a file already exists with a name equal to the target | | 1273 | If a file already exists with a name equal to the target |
1275 | local filename for a | | 1274 | local filename for a |
1276 | .Ic get | | 1275 | .Ic get |
1277 | or | | 1276 | or |
1278 | .Ic mget | | 1277 | .Ic mget |
1279 | command, a ".1" is appended to the name. | | 1278 | command, a ".1" is appended to the name. |
1280 | If the resulting name matches another existing file, | | 1279 | If the resulting name matches another existing file, |
1281 | a ".2" is appended to the original name. | | 1280 | a ".2" is appended to the original name. |
1282 | If this process continues up to ".99", an error | | 1281 | If this process continues up to ".99", an error |
1283 | message is printed, and the transfer does not take place. | | 1282 | message is printed, and the transfer does not take place. |
1284 | The generated unique filename will be reported. | | 1283 | The generated unique filename will be reported. |
1285 | Note that | | 1284 | Note that |