1wput(1) Internet Applications - FTP wput(1)
2
3
4
6 wput - A wget-like ftp-uploader
7
9 wput [option]... [file]... [URL]...
10
12 Wput is a free utility that is able to upload files to a ftp-server.
13
14 Wput is non-interactive and background-capable. It can upload files or
15 whole directories and is meant to be a robust client even for unstable
16 connections and will therefore retry to upload a file, if the connec‐
17 tion broke.
18
19 Wput supports resuming, so it automatically continues uploading from
20 the point where the previous upload stopped, meaning that you can kill
21 Wput anytime and it will (if the remote ftp-server supports this, being
22 most likely the case) finish the partial uploaded file.
23
24 Wput supports connections through proxies, allowing you to use it in an
25 environment that can access the internet only via a proxy or to provide
26 anonymity by hiding your ip-address to the server. For SOCKSv5-proxies
27 Wput supports also listening mode, allowing you to use port-mode ftp
28 through a proxy (useful if the remote ftp is behind a firewall or a
29 gateway).
30
31 Wput supports timestamping, so it will (in the ideal case and if times‐
32 tamping is enabled) only upload files, that are newer than the remote-
33 file.
34
35 The upload-rate of Wput can be restricted, so that Wput won't eat all
36 available bandwidth.
37
39 URLs are recognized by the ftp://-prefix
40
41 Wput first reads the URLs from command-line, and associates the first
42 file with the first URL, the second file with the second URL etc. It
43 then transmits the file/URL combinations that are already complete.
44 Afterwards, Wput uses the --input-file (if any) and reads the URLs
45 using the same sheme as above. In situations where more URLs than
46 files are specified, Wput tries to guess the local filename from the
47 URL. In case there are more files that URLs remaining, Wput uses the
48 last known URL for each of the files.
49
50 So you can specify e.g. one URL and read all filenames from a file. Or
51 use wput *.txt ftp://host, to transfer all *.txt-files. So
52 doc/USAGE.examples for further examples.
53
54 To be on the safe side, it is recommended to supply the files before
55 the URLs.
56
58 If Wput has an URL without a corresponding filename, Wput tries to
59 guess the local file's location. e.g. using wput ftp://host/direc‐
60 tory/path/file, Wput will look out for /directory/path/file. If not
61 found, Wput looks for ./directory/path/file, ./path/file and ./file.
62
64 -V
65 --version
66 Display the version of wput.
67
68 -h
69 --help
70 Print a help screen, with a short description of wput's command-
71 line options.
72
73 -b
74 --background
75 Go to background immediately after startup. If no output file is
76 given, wput will redirect its output to "./wputlog"
77
78 -o logfile
79 --output-file=logfile
80 Log all messages to logfile.
81
82 -a logfile
83 --append-output=logfile
84 Append all logged messages to logfile.
85
86 -q
87 --quiet
88 Turn off Wput's output.
89
90 -v
91 --verbose
92 Turn on verbose output. This gives some more information about what
93 Wput does. If you specify this flag twice, you get debug output.
94
95 -nv
96 --less-verbose
97 Be less verbose. That means reducing Wput's output to a minimun.
98 Specifiing this flag more often is equal to the --quiet flag. Some
99 people also like combining the -v and -nv flags, being quite sense‐
100 less.
101
102 -i file
103 --input-file=file
104 Reads URLs and filenames from file. If there are URLs on the com‐
105 mand-line too, these will be retrieved first, unless sorting is
106 enabled. See also the URL-Input-Handling section. If file is -,
107 the URLs will be read from stdin. If you want to pipe the contents
108 of the file that shall be uploaded to stdin, this cannot be done
109 (yet). But you can use the --input-pipe flag and read the contents
110 a) from a named pipe -I "cat named.pipe; echo > /dev/null" or b)
111 directly from the command, that outputs the data. (See --input-
112 pipe) Do not do things like find | wput ftp://host/ -i -! Wput
113 would upload all files from the current directory (since the first
114 output of find will be '.') and afterwards each file again (since
115 find postes its name to Wput. And further problematic is that Wput
116 will upload each directory that is given by find and since find
117 itself recurses all directories, the files would be uploaded three
118 times (or even more often for further subdirectories). Use wput
119 ftp://host/ to upload everything from the local directory. Or use
120 find ! -type d | wput ftp://host/ -i - to tell find, not to output
121 directories.
122
123 -s
124 --sort
125 If sorting is enabled Wput first reads all URLs from any input-
126 devices available and will sort them before transmitting each file.
127 The sorting order is: ip/hostname, port, username, password, direc‐
128 tory, filename. Sorting requires a bit more memory since all data
129 needs to be hold there.
130
131 --basename=path
132 This option causes Wput to snip path from all input-files when they
133 are connected to the URL. wput /usr/share/doc.tgz ftp://host/ would
134 create ftp://host//usr/share/doc.tgz, whereas specifing /usr/share/
135 as basename will result in ftp://host/doc.tgz being created.
136
137 -I command
138 --input-pipe=command
139 If no file/directory can be "guessed" (see "Guessing Local File")
140 from the URL, the output of command is taken as file-input. command
141 is invoked as follows:
142
143 command ftp "username" "ip/hostname" port "remote_directory"
144 "remote_filename"
145
146 The hostname is only supplied if the ip cannot be resolved. If you
147 do not want these parameters to confuse the programm from which you
148 read the contents, use something like '-I "cat file; echo >
149 /dev/null"' so that these parameters are passed to echo and to
150 /dev/null afterwards. Since the progressbar is not capable of han‐
151 dling unknown filesizes, the filesize is set to 1 GiB. Therefore
152 the ETA shows a wrong value.
153
154 -R
155 --remove-source-files
156 Unlinks/deletes files that have been successfully transmitted.
157
158 --bind-address=ADDRESS
159 When making client TCP/IP connections, bind() to ADDRESS on the
160 local machine. ADDRESS may be specified as a hostname or IP
161 address. This option can be useful if your machine is bound to
162 multiple IPs.
163
164 -t number
165 --tries=number
166 Set number of retries to number. Specify -1 for infinite retrying.
167 The default is to retry 3 times, with some exceptions on fatal
168 errors.
169
170 -nc
171 --dont-continue
172 If this flag is specified, resuming will be turned off, meaning
173 that a remote file being smaller than the local one will be over‐
174 written. To skip this file, you have to enable --skip-existing.
175 See also doc/USAGE.resumehandling
176
177 -u
178 --reupload
179 If this flag is specified, a remote file having the same size as
180 the local one is to be uploaded. Skipping is default.
181
182 --skip-larger
183 If this flag is specified, a remote file being larger than the
184 local one will be skipped. Default is reuploading it.
185
186 --skip-existing
187 If this flag is specified, the upload of a file will be skipped if
188 the remote file already exists.
189
190 -N
191 --timestamping
192 If timestamping is enabled, Wput will retrieve a directory list and
193 parse it to determine the remote file-date. If the local file is
194 newer than the remote one (there is a default allowed timevariance
195 of 5 seconds, which can be adjusted in the wputrc-file) it is
196 uploaded, otherwise skipped. The local date is dermined by the
197 mtime (time of last modification), using the current time-zone.
198 This should be equal to the output of ls -l. Since you usually do
199 not want to resume existing files, you should employ the --reupload
200 --dont-continue flags as well.
201
202 -l RATE
203 --limit-rate=RATE
204 If you don't want Wput to eat up all available bandwidth, specify
205 this flag. RATE is a numeric value. The units 'K' (for KiB) and
206 'M' (for MiB) are understood. The upload rate is limited on aver‐
207 age, meaning that if you limit the rate to 10K and Wput was just
208 able to send with 5K for the first seconds, it will send (if possi‐
209 ble) afterwards more than 10K until the average rate of 10K is ful‐
210 filled.
211
212 --no-directories
213 If Wput is unable to CWD into a directory, it will try to create
214 it. If this is not the desired behaviour specify this flag to force
215 Wput not to create any directories.
216
217 -Y MODE
218 --proxy=MODE
219 MODE can be either http for http-based proxies (such as SQUID),
220 socks for SOCKSv5 proxies or off to disable the proxy.
221
222 --proxy-user=NAME
223 If the proxy-server requires authentication, use NAME as user-name.
224 You need to specify --proxy-pass too. These information can also be
225 stored in the wputrc-file.
226
227 --proxy-pass=PASS
228 Specifies the password to use for the proxy.
229
230 -p
231 --port-mode
232 Per default, Wput uses passive mode ftp, which works well for most
233 configurations. If passive mode fails, Wput automatically falls
234 back to port mode. If you want Wput to start using port mode ftp,
235 specify this flag.
236
237 -A
238 --ascii
239 Wput automatically determines which transfer-format to use, by
240 looking at the file-extensions. Certain files are recognized as
241 ASCII. These are: txt, c, java, cpp, sh, f, f90, f77, f95, bas",
242 pro, csh, ksh, conf, htm, html, php, pl, cgi, inf, js, asp, bat,
243 cfm, css, dhtml, diz, h, hpp, ini, mak, nfo, shtml, shtm, tcl, pas
244 Specifying this flag forces Wput to use ASCII mode file transfers.
245
246 -B
247 --binary
248 Specifiing this flag forces Wput to use BINARY mode file transfers.
249
250 --force-tls
251 If this flag is specified and Wput is linked with the OpenSSL-
252 library, the flag enforces the usage of TLS: If no TLS-connection
253 can be established the process will cancel and not try to go on
254 with an unencrypted connection.
255
257 Normally, the exit status is 0 if either everything went fine or there
258 was nothing to do. If some files were skipped during the upload (due
259 to timestamping or resume-rules) the exit status is set to 1. If some
260 files failed to be transmitted due to an remote error, exit status is
261 2. If some files failed and some others were skipped, exit status is 3.
262 For general problems like failure of some system-functions the exit
263 status is 4.
264
266 You are welcome to send bug reports and suggestions about Wput through
267 the Sourceforge Bugtracking System: http://source‐
268 forge.net/tracker/?group_id=141519
269
270 Please send all available information that might concern this bug (e.g.
271 Operating System and what can be done to reproduce the error). Supply
272 also the debug-output (but remove confidential data if any), which
273 helps a lot analysing the problem. If you use a wputrc file, it might
274 also be useful to provide the relevant parts of it.
275
276 If there is a crash due to a segfault or similar, try to run it in a
277 debugger, e.g. gdb `which wput` core and type where to get the back‐
278 trace. It would also be great help if you could recompile wput with
279 memory-debugging support (make clean; make memdbg; [make install]) and
280 use this debug-dump.
281
283 Many options can be set in a wputrc file. For its documentation consult
284 the sample file provided by Wput. There are some USAGE.* files in the
285 doc/ directory of Wput. These contain further information and samples
286 on how to use Wput.
288 Wput is written by Hagen Fritsch <fritsch+wput-man@in.tum.de>
289
290
291
292Hagen Fritsch 0.5 wput(1)