File: 31-wput.1--option-order.patch

package info (click to toggle)
wput 0.6.2%2Bgit20130413-15
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,676 kB
  • sloc: ansic: 6,854; sh: 3,460; makefile: 72; sed: 16
file content (479 lines) | stat: -rw-r--r-- 17,747 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
From: Jari Aalto <jari.aalto@cante.net>
Subject: Order alphabetically, use GNU -o, --option format

--- a/doc/wput.1
+++ b/doc/wput.1
@@ -1,8 +1,11 @@
 .TH "wput" "1" "0.6.2" "Hagen Fritsch" "Internet Applications - FTP"
+
 .SH "NAME"
 wput \- A wget\-like ftp\-uploader
+
 .SH "SYNOPSIS"
-wput [\fIoption\fR]... [\fI\s-1file\s0\fR]... [\fI\s-1URL\s0\fR]... 
+wput [\fIoptions\fR] \fI\s-1file [file ...\s0\fR] \fI\s-1URL \s0\fR
+
 .SH "DESCRIPTION"
 Wput is a free utility that is able to upload files to a ftp-server.
 .PP
@@ -27,7 +30,7 @@
 .PP
 The upload-rate of Wput can be restricted, so that Wput won't eat all available
 bandwidth.
-.SH "URL\-Input\-Handling"
+.SS "URL\-Input\-Handling"
 URLs are recognized by the ftp://\-prefix
 .PP
 Wput first reads the URLs from command-line, and associates the first file with
@@ -44,91 +47,34 @@
 See \fIdoc/USAGE.examples\fR for further examples.
 .PP
 To be on the safe side, it is recommended to supply the files before the URLs.
-.SH "Guessing Local File"
+.SS "Guessing Local File"
 If Wput has an URL without a corresponding filename, Wput tries to guess the
 local file's location. e.g. using wput ftp://host/directory/path/file, Wput
 will look out for /directory/path/file. If not found, Wput looks for ./directory/path/file, ./path/file and ./file.
+
 .SH "OPTIONS"
-.SH "Basic Startup Options"
-.IP "\fB\-V\fR" 4
-.IX Item "-V"
-.PD 0
-.IP "\fB\-\-version\fR" 4
-.IX Item "--version"
-.PD
-Display the version of wput.
-.IP "\fB\-h\fR" 4
-.IX Item "-h"
-.PD 0
-.IP "\fB\-\-help\fR" 4
-.IX Item "--help"
-.PD
-Print a help screen, with a short description of wput's command-line options.
-.IP "\fB\-b\fR" 4
-.IX Item "-b"
-.PD 0
-.IP "\fB\-\-background\fR" 4
-.IX Item "--background"
-.PD
-Go to background immediately after startup.  If no output file is given,
-wput will redirect its output to "./wputlog"
-.SH "Logging and Input File Options"
-.IX Subsection "Logging and Input File Options"
-.IP "\fB\-o\fR \fIlogfile\fR" 4
-.IX Item "-o logfile"
-.PD 0
-.IP "\fB\-\-output\-file=\fR\fIlogfile\fR" 4
-.IX Item "--output-file=logfile"
-.PD
-Log all messages to \fIlogfile\fR.
-.IP "\fB\-a\fR \fIlogfile\fR" 4
-.IX Item "-a logfile"
-.PD 0
-.IP "\fB\-\-append\-output=\fR\fIlogfile\fR" 4
-.IX Item "--append-output=logfile"
-.PD
+.SS "Logging and Input File Options"
+.TP
+.BR \-a " \fIlogfile\fP, " \-\-append-output =\fIlogfile\fP
 Append all logged messages to \fIlogfile\fR.
-.IP "\fB\-q\fR" 4
-.IX Item "-q"
-.PD 0
-.IP "\fB\-\-quiet\fR" 4
-.IX Item "--quiet"
-.PD
-Turn off Wput's output.
-.IP "\fB\-v\fR" 4
-.IX Item "-v"
-.PD 0
-.IP "\fB\-\-verbose\fR" 4
-.IX Item "--verbose"
-.PD
-Turn on verbose output. This gives some more information about what Wput
-does. If you specify this flag twice, you get debug output.
-.IP "\fB\-nv\fR" 4
-.IX Item "-nv"
-.PD 0
-.IP "\fB\-\-less\-verbose\fR" 4
-.IX Item "--less-verbose"
-.PD
-Be less verbose. That means reducing Wput's output to a minimum. Specifiing
-this flag more often is equal to the \-\-quiet flag.
-Some people also like combining the \-v and \-nv flags, being quite senseless.
-.IP "\fB\-i\fR \fIfile\fR" 4
-.IX Item "-i file"
-.PD 0
-.IP "\fB\-\-input\-file=\fR\fIfile\fR" 4
-.IX Item "--input-file=file"
-.PD
+.TP
+.BR \-\-basename =\fIpath\fP
+This option causes Wput to snip \fIpath\fR from all input\-files when they are
+connected to the URL. wput /usr/share/doc.tgz ftp://host/ would create
+ftp://host//usr/share/doc.tgz, whereas specifying /usr/share/ as basename will
+result in ftp://host/doc.tgz being created.
+.TP
+.BR \-i " \fIfile\fP, " \-\-input-file =\fIfile\fP
 Reads URLs and filenames from \fIfile\fR. If there are URLs on the command-line
 too, these will be retrieved first, unless sorting is enabled.
 See also the URL-Input-Handling section.
-.PD
+
 If \fIfile\fR is \-, the URLs will be read from stdin.
-.PD
 If you want to pipe the contents of the file that shall be uploaded to
 stdin, this cannot be done (yet). But you can use the \-\-input\-pipe flag
 and read the contents a) from a named pipe \-I "cat named.pipe; echo > /dev/null" or b)
 directly from the command, that outputs the data. (See \-\-input\-pipe)
-.PD
+
 Do \fBnot\fR do things like \fIfind | wput ftp://host/ \-i \-\fR!
 Wput would upload all files from the current directory (since the first output
 of find will be '.') and afterwards each file again (since find postes its name to Wput. And further problematic is that Wput will upload each directory that
@@ -137,188 +83,157 @@
 Use \fIwput ftp://host/\fR to upload everything from the local directory.
 Or use \fIfind ! \-type d | wput ftp://host/ \-i \-\fR to tell find, not to
 output directories.
-.IP "\fB\-s\fR" 4
-.IX Item "-s"
-.PD 0
-.IP "\fB\-\-sort\fR" 4
-.IX Item "--sort"
-.PD
-If sorting is enabled Wput first reads all URLs from any input-devices available
-and will sort them before transmitting each file.
-.PD
-The sorting order is: ip/hostname, port, username, password, directory, filename.
-Sorting requires a bit more memory since all data needs to be hold there.
-.IP "\fB\-\-basename=\fR\fIpath\fR" 4
-.IX Item "--basename=path"
-.PD
-This option causes Wput to snip \fIpath\fR from all input\-files when they are
-connected to the URL. wput /usr/share/doc.tgz ftp://host/ would create
-ftp://host//usr/share/doc.tgz, whereas specifying /usr/share/ as basename will
-result in ftp://host/doc.tgz being created.
-.IP "\fB\-I\fR \fIcommand\fR" 4
-.IX Item "-I command"
-.PD 0
-.IP "\fB\-\-input\-pipe=\fR\fIcommand\fR" 4
-.IX Item "--input-pipe=command"
-.PD
+.TP
+.BR \-I " \fIcommand\fP, " \-\-input\-pipe= \fIcommand\fP
 If no file/directory can be "guessed" (see "Guessing Local File") from the URL,
 the output of \fIcommand\fB is taken as file-input. command is invoked as follows:
-.PP
+
 \&       command ftp "username" "ip/hostname" port "remote_directory" "remote_filename"
-.IP "" 4
-.PD
+
 The hostname is only supplied if the ip cannot be resolved.
 If you do not want these parameters to confuse the program from which you read
 the contents, use something like '\-I "cat file; echo > /dev/null"' so that these
 parameters are passed to echo and to /dev/null afterwards.
 Since the progressbar is not capable of handling unknown filesizes, the filesize
 is set to 1 GiB. Therefore the ETA shows a wrong value.
-.IP "\fB\-R\fR" 4
-.IX Item "-R"
-.PD 0
-.IP "\fB\-\-remove\-source\-files\fR" 4
-.IX Item "--remove-source-files"
-.PD
+.TP
+.BR \-nv ", " \-\-less\-verbose
+Be less verbose. That means reducing Wput's output to a minimum. Specifying
+this flag more often is equal to the \-\-quiet flag.
+Some people also like combining the \-v and \-nv flags, being quite senseless.
+.TP
+.BR \-o " \fIlogfile\fP, " \-\-output\-file =\fIlogfile\fP
+Log all messages to \fIlogfile\fP.
+.TP
+.BR \-q ", " \-\-quiet
+Turn off Wput's output.
+.TP
+.BR \-R ", " \-\-remove\-source\-files
 Unlinks/deletes files that have been successfully transmitted.
-.SH "Upload Options"
+.TP
+.BR \-s ", " \-\-sort
+If sorting is enabled Wput first reads all URLs from any input-devices available
+and will sort them before transmitting each file.
+
+The sorting order is: ip/hostname, port, username, password, directory, filename.
+Sorting requires a bit more memory since all data needs to be held there.
+.TP
+.BR \-v ", " \-\-verbose
+Turn on verbose output. This gives some more information about what Wput
+does. If you specify this flag twice, you get debug output.
+
+.SS "Upload Options"
 .IX Subsection "Upload Options"
-.IP "\fB\-\-bind\-address=\fR\fI\s-1ADDRESS\s0\fR" 4
-.IX Item "--bind-address=ADDRESS"
-When making client \s-1TCP/IP\s0 connections, \f(CW\*(C`bind()\*(C'\fR to \fI\s-1ADDRESS\s0\fR on
-the local machine.  \fI\s-1ADDRESS\s0\fR may be specified as a hostname or \s-1IP\s0
-address.  This option can be useful if your machine is bound to multiple
+.TP
+.BR \-A ", " \-\-ascii
+Wput automatically determines which transfer\-format to use, by looking at
+the file-extensions. Certain files are recognized as ASCII. These are:
+txt, c, java, cpp, sh, f, f90, f77, f95, bas, pro, csh, ksh, conf, htm, html, php, pl, cgi, ing, js, asp, bat, cfm, css, dhtml, diz, h, hpp, ini, mak, nfo, shtml, shtm, tcl, pas
+
+Specifying this flag forces Wput to use ASCII mode file transfers.
+.TP
+.BR \-b ", " \-\-background
+Go to background immediately after startup.  If no output file is given,
+wput will redirect its output to "./wputlog"
+.TP
+.BR \-B ", " \-\-binary
+Specifying this flag forces Wput to use BINARY mode file transfers.
+.TP
+.BR \-\-bind\-address =\fIaddress\fP
+When making client TCP/IP connections, bind() to \fIaddress\fP to
+\fI\s-1address\s0\fP on the local machine. \fI\s-1address\s0\fP may br
+specified as a hostname or \s-1IP\s0 address. This option can be
+useful if your machine is bound to multiple
 IPs.
-.IP "\fB\-t\fR \fInumber\fR" 4
-.IX Item "-t number"
-.PD 0
-.IP "\fB\-\-tries=\fR\fInumber\fR" 4
-.IX Item "--tries=number"
-.PD
-Set number of retries to \fInumber\fR. Specify \-1 for infinite retrying,
-which is default, too.
-.IP "\fB\-nc\fR" 4
-.IX Item "-nc"
-.PD 0
-.IP "\fB\-\-dont\-continue\fR" 4
-.IX Item "--dont-continue"
-.PD
+.BR \-\-force\-tls
+If this flag is specified and Wput is linked with the OpenSSL-library, the flag
+enforces the usage of TLS: If no TLS\-connection can be established the process
+will cancel and not try to go on with an unencrypted connection.
+.SS "Basic Startup Options"
+.TP
+.BR \-l " \fIrate\fP, " \-\-limit\-rate =\fIrate\fP
+If you don't want Wput to eat up all available bandwidth, specify this flag.
+\fIrate\fP is a numeric value. The units 'K' (for KiB) and 'M' (for MiB) are
+understood.
+
+The upload rate is limited on average, meaning that if you limit the rate to
+10K and Wput was just able to send with 5K for the first seconds, it will
+send (if possible) afterwards more than 10K until the average rate of 10K is
+fulfilled.
+.TP
+.BR \-m ", " \-\-chmod
+This will change the access mode of the transferred files. The format is the
+three-digit octal unix mode, e.g. 644 means rw-r--r--.
+.TP
+.BR \-nc ", " \-\-dont\-continue
 If this flag is specified, resuming will be turned off, meaning that a remote
 file being smaller than the local one will be overwritten. To skip this file,
 you have to enable \-\-skip\-existing.
-.PD
+
 See also \fIdoc/USAGE.resumehandling\fR
-.IP "\fB\-u\fR" 4
-.IX Item "-u"
-.PD 0
-.IP "\fB\-\-reupload\fR" 4
-.IX Item "--reupload"
-.PD
-If this flag is specified, a remote file having the same size as the local one
-is to be uploaded. Skipping is default.
-.IP "\fB\-\-skip\-larger\fR" 4
-.IX Item "--skip-larger"
-.PD
-If this flag is specified, a remote file being larger than the local one will
-be skipped. Default is reuploading it.
-.IP "\fB\-\-skip\-existing\fR" 4
-.IX Item "--skip-existing"
-.PD
-If this flag is specified, the upload of a file will be skipped if the remote
-file already exists.
-.IP "\fB\-N\fR" 4
-.IX Item "-N"
-.PD 0
-.IP "\fB\-\-timestamping\fR" 4
-.IX Item "--timestamping"
-.PD
+.TP
+.BR \-N ", " \-\-timestamping
 If timestamping is enabled, Wput will retrieve a directory list and parse it to
 determine the remote file\-date. If the local file is newer than the remote one
 (there is a default allowed timevariance of 5 seconds, which can be adjusted in
 the \fIwputrc\fR-file) it is uploaded, otherwise skipped.
-.PD
+
 The local date is dermined by the mtime (time of last modification), using the
 current time-zone. This should be equal to the output of ls \-l.
-.PD
+
 Since you usually do not want to resume existing files, you should employ the
 \-\-reupload \-\-dont-continue flags as well.
-.IP "\fB\-l\fR \fIRATE\fR" 4
-.IX Item "-l RATE"
-.PD 0
-.IP "\fB\-\-limit\-rate=\fR\fIRATE\fR" 4
-.IX Item "--limit-rate=RATE"
-If you don't want Wput to eat up all available bandwidth, specify this flag.
-\fIRATE\fR is a numeric value. The units 'K' (for KiB) and 'M' (for MiB) are
-understood.
-.PD
-The upload rate is limited on average, meaning that if you limit the rate to
-10K and Wput was just able to send with 5K for the first seconds, it will
-send (if possible) afterwards more than 10K until the average rate of 10K is
-fulfilled.
-.IP "\fB\-\-no\-directories\fR" 4
-.IX Item "--no-directories"
-.PD
-If Wput is unable to CWD into a directory, it will try to create it. If this
-is not the desired behaviour specify this flag to force Wput not to create
-any directories.
-.IP "\fB\-Y\fR \fIMODE\fR" 4
-.IX Item "-Y MODE"
-.PD 0
-.IP "\fB\-\-proxy=\fR\fIMODE\fR" 4
-.IX Item "--proxy=MODE"
-.PD
-MODE can be either \fIhttp\fR for http-based proxies (such as SQUID),
-\fIsocks\fR for SOCKSv5 proxies or \fIoff\fR to disable the proxy.
-.IP "\fB\-\-proxy-user=\fR\fINAME\fR" 4
-.IX Item "--proxy-user=NAME"
+.TP
+.BR \-p ", " \-\-port\-mode
+Per default, Wput uses passive mode ftp, which works well for most
+configurations. If passive mode fails, Wput automatically falls back to
+port mode.
+
+If you want Wput to start using port mode ftp, specify this flag.
+.TP
+.BR \-\-proxy =\fImode\fP
+Alias is option \-Y. The \fImode\fP can be either \fIhttp\fR for http-based
+proxies (such as SQUID), \fIsocks\fP for SOCKSv5 proxies or \fIoff\fP
+to disable the proxy.
+.TP
+.BR \-\-proxy-user =\fIname\fP
 If the proxy\-server requires authentication, use \fINAME\fR as user-name.
 You need to specify \-\-proxy-pass too. These information can also be
 stored in the wputrc\-file.
-.IP "\fB\-\-proxy-pass=\fR\fIPASS\fR" 4
-.IX Item "--proxy-pass=PASS"
+.TP
+.BR \-\-proxy\-pass =\fIpassword\fP
 Specifies the password to use for the proxy.
-.SH "FTP Options"
+.SS "FTP Options"
 .IX Subsection "FTP Options"
-.IP "\fB\-p\fR" 4
-.IX Item "-p"
-.PD 0
-.IP "\fB\-\-port\-mode\fR" 4
-.IX Item "--port-mode"
-Per default, Wput uses passive mode ftp, which works well for most
-configurations. If passive mode fails, Wput automatically falls back to
-port mode.
-.PD
-If you want Wput to start using port mode ftp, specify this flag.
-.IP "\fB\-A\fR" 4
-.IX Item "-A"
-.PD 0
-.IP "\fB\-\-ascii\fR" 4
-.IX Item "--ascii"
-Wput automatically determines which transfer\-format to use, by looking at
-the file-extensions. Certain files are recognized as ASCII. These are:
-txt, c, java, cpp, sh, f, f90, f77, f95, bas, pro, csh, ksh, conf, htm, html, php, pl, cgi, inf, js, asp, bat, cfm, css, dhtml, diz, h, hpp, ini, mak, nfo, shtml, shtm, tcl, pas
-.PD
-Specifying this flag forces Wput to use ASCII mode file transfers.
-.IP "\fB\-B\fR" 4
-.IX Item "-B"
-.PD 0
-.IP "\fB\-\-binary\fR" 4
-.IX Item "--binary"
-.PD
-Specifying this flag forces Wput to use BINARY mode file transfers.
-.IP "\fB\-m\fR\fIMODE\fR" 4
-.IX Item "-m"
-.PD 0
-.IP "\fB\-\-chmod=\fR\fIMODE\fR" 4
-.IX Item "--chmod="
-.PD
-This will change the access mode of the transferred files. The format is the
-normal octal unix mode, e.g. 644 means rw-r--r--.
-If \fIMODE\fR is omitted, the mode of the local file will be used.
-.IP "\fB\-\-force-tls\fR" 4
-.IX Item "--force-tls"
-If this flag is specified and Wput is linked with the OpenSSL-library, the flag
-enforces the usage of TLS: If no TLS\-connection can be established the process
-will cancel and not try to go on with an unencrypted connection.
+.TP
+.BR \-\-no\-directories
+If Wput is unable to CWD into a directory, it will try to create it. If this
+is not the desired behaviour specify this flag to force Wput not to create
+any directories.
+.TP
+.BR \-t " \fInumber\fP, " \-\-tries =\fInumber\fP
+Set number of retries to \fInumber\fP. Specify \-1 for infinite retrying,
+which is default, too.
+.TP
+.BR \-u ", " \-\-reupload
+If this flag is specified, a remote file having the same size as the local one
+is to be uploaded. Skipping is default.
+.TP
+.BR \-\-skip\-larger
+If this flag is specified, a remote file being larger than the local one will
+be skipped. Default is reuploading it.
+.TP
+.BR \-\-skip\-existing
+If this flag is specified, the upload of a file will be skipped if the remote
+file already exists.
+.SS General options
+.TP
+.BR \-V ", " \-\-version
+Display the version of wput.
+.TP
+.BR \-h ", " \-\-help
+Print a help screen, with a short description of wput's command-line options.
+
 .SH DIAGNOSTICS
 Normally, the exit status is 0 if either everything went fine or there was nothing
 to do.
@@ -327,6 +242,7 @@
 remote error, exit status is 2. If some files failed and some others were skipped,
 exit status is 3. For general problems like failure of some system-functions the
 exit status is 4.
+
 .SH BUGS
 .IX Header "BUGS"
 .PD
@@ -339,11 +255,12 @@
 analysing the problem. If you use a wputrc file, it might also be useful
 to provide the relevant parts of it.
 .PP 0
-If there is a crash due to a segfault or similar, try to run it in a debugger, 
-e.g. \f(CW\*(C`gdb `which wput` core\*(C'\fR and type \f(CW\*(C`where\*(C'\fR
-to get the backtrace. It would also be great help if you could recompile wput
-with memory-debugging support (make clean; make memdbg; [make install]) and use
-this debug-dump.
+If there is a crash due to a segfault or similar, try to run it in a
+debugger, e.g. gdb /usr/bin/wput core and type where to get the
+backtrace. It would also be great help if you could recompile wput
+with memory-debugging support (make clean; make memdbg; [make
+install]) and use this debug-dump.
+
 .SH "SEE ALSO"
 .IX Header "SEE ALSO"
 Many options can be set in a wputrc file. For its documentation consult the
@@ -351,6 +268,7 @@
 .PD 0
 There are some USAGE.* files in the doc/ directory of Wput. These contain
 further information and samples on how to use Wput.
+
 .SH "AUTHOR"
 .IX Header "AUTHOR"
 Wput is written by Hagen Fritsch <fritsch+wput-man@in.tum.de>