Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
wput(1)			  Internet Applications	- FTP		       wput(1)

NAME
       wput - A	wget-like ftp-uploader

SYNOPSIS
       wput [option]...	[file]... [URL]...

DESCRIPTION
       Wput is a free utility that is able to upload files to a	ftp-server.

       Wput  is	non-interactive	and background-capable.	It can upload files or
       whole directories and is	meant to be a robust client even for  unstable
       connections  and	 will therefore	retry to upload	a file,	if the connec-
       tion broke.

       Wput supports resuming, so it automatically  continues  uploading  from
       the  point where	the previous upload stopped, meaning that you can kill
       Wput anytime and	it will	(if the	remote ftp-server supports this, being
       most likely the case) finish the	partial	uploaded file.

       Wput supports connections through proxies, allowing you to use it in an
       environment that	can access the internet	only via a proxy or to provide
       anonymity by hiding your	ip-address to the server.  For SOCKSv5-proxies
       Wput supports also listening mode, allowing you to  use	port-mode  ftp
       through	a  proxy  (useful  if the remote ftp is	behind a firewall or a
       gateway).

       Wput supports timestamping, so it will (in the ideal case and if	times-
       tamping	is enabled) only upload	files, that are	newer than the remote-
       file.

       The upload-rate of Wput can be restricted, so that Wput won't  eat  all
       available bandwidth.

URL-Input-Handling
       URLs are	recognized by the ftp://-prefix

       Wput  first  reads the URLs from	command-line, and associates the first
       file with the first URL,	the second file	with the second	URL  etc.   It
       then  transmits	the  file/URL  combinations that are already complete.
       Afterwards, Wput	uses the --input-file (if any) and reads the URLs  us-
       ing  the	same sheme as above.  In situations where more URLs than files
       are specified, Wput tries to guess the local filename from the URL.  In
       case there are more files that URLs remaining, Wput uses	the last known
       URL for each of the files.

       So you can specify e.g. one URL and read	all filenames from a file.  Or
       use  wput  *.txt	 ftp://host, to	transfer all *.txt-files.  See doc/US-
       AGE.examples for	further	examples.

       To be on	the safe side, it is recommended to supply  the	 files	before
       the URLs.

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/direc-
       tory/path/file,	Wput  will  look  out for /directory/path/file.	If not
       found, Wput looks for ./directory/path/file, ./path/file	and ./file.

OPTIONS
       -V
       --version
	   Display the version of wput.

       -h
       --help
	   Print a help	screen,	with a short description  of  wput's  command-
	   line	options.

       -b
       --background
	   Go  to  background immediately after	startup.  If no	output file is
	   given, wput will redirect its output	to "./wputlog"

       -o logfile
       --output-file=logfile
	   Log all messages to logfile.

       -a logfile
       --append-output=logfile
	   Append all logged messages to logfile.

       -q
       --quiet
	   Turn	off Wput's output.

       -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.

       -nv
       --less-verbose
	   Be  less  verbose.  That means reducing Wput's output to a minimun.
	   Specifiing this flag	more often is equal to the --quiet flag.  Some
	   people also like combining the -v and -nv flags, being quite	sense-
	   less.

       -i file
       --input-file=file
	   Reads URLs and filenames from file. If there	are URLs on  the  com-
	   mand-line too, these	will be	retrieved first, unless	sorting	is en-
	   abled.  See also the	URL-Input-Handling section.  If	file is	-, the
	   URLs	 will be read from stdin.  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) Do not	do things like find | wput  ftp://host/	 -i  -!	  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 is given by find and	since find it-
	   self	 recurses  all	directories, the files would be	uploaded three
	   times (or even more often for further  subdirectories).   Use  wput
	   ftp://host/	to upload everything from the local directory.	Or use
	   find	! -type	d | wput ftp://host/ -i	- to tell find,	not to	output
	   directories.

       -s
       --sort
	   If  sorting is enabled Wput first reads all URLs from any input-de-
	   vices available and will sort them before transmitting  each	 file.
	   The sorting order is: ip/hostname, port, username, password,	direc-
	   tory, filename.  Sorting requires a bit more	memory since all  data
	   needs to be hold there.

       --basename=path
	   This	option causes Wput to snip path	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 specifing /usr/share/
	   as basename will result in ftp://host/doc.tgz being created.

       -I command
       --input-pipe=command
	   If no file/directory	can be "guessed" (see "Guessing	 Local	File")
	   from	the URL, the output of command is taken	as file-input. command
	   is invoked as follows:

	      command ftp  "username"  "ip/hostname"  port  "remote_directory"
       "remote_filename"

	   The hostname	is only	supplied if the	ip cannot be resolved.	If you
	   do not want these parameters	to confuse the programm	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 han-
	   dling unknown filesizes, the	filesize is set	to  1  GiB.  Therefore
	   the ETA shows a wrong value.

       -R
       --remove-source-files
	   Unlinks/deletes files that have been	successfully transmitted.

       --bind-address=ADDRESS
	   When	making client TCP/IP connections, bind() to ADDRESS on the lo-
	   cal machine.	 ADDRESS may be	specified as a hostname	or IP address.
	   This	option can be useful if	your machine is	bound to multiple IPs.

       -t number
       --tries=number
	   Set number of retries to number.  Specify -1	for infinite retrying,
	   which is default, too.

       -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 over-
	   written. To skip this file, you  have  to  enable  --skip-existing.
	   See also doc/USAGE.resumehandling

       -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.

       --skip-larger
	   If this flag	is specified, a	remote file being larger than the  lo-
	   cal one will	be skipped. Default is reuploading it.

       --skip-existing
	   If  this flag is specified, the upload of a file will be skipped if
	   the remote file already exists.

       -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	wputrc-file) it	is up-
	   loaded, otherwise skipped.  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.  Since you usually  do  not
	   want	 to  resume  existing  files, you should employ	the --reupload
	   --dont-continue flags as well.

       -l RATE
       --limit-rate=RATE
	   If you don't	want Wput to eat up all	available  bandwidth,  specify
	   this	 flag.	 RATE  is a numeric value. The units 'K' (for KiB) and
	   'M' (for MiB) are understood.  The upload rate is limited on	 aver-
	   age,	 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	possi-
	   ble)	afterwards more	than 10K until the average rate	of 10K is ful-
	   filled.

       --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.

       -Y MODE
       --proxy=MODE
	   MODE	can be either http for http-based  proxies  (such  as  SQUID),
	   socks for SOCKSv5 proxies or	off to disable the proxy.

       --proxy-user=NAME
	   If the proxy-server requires	authentication,	use NAME as user-name.
	   You need to specify --proxy-pass too. These information can also be
	   stored in the wputrc-file.

       --proxy-pass=PASS
	   Specifies the password to use for the proxy.

       -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.

       -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, inf, 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.

       -B
       --binary
	   Specifying this flag	forces Wput to use BINARY mode file transfers.

       -m
       --chmod
	   This	will change the	access mode of the transferred files. The for-
	   mat is the three-digit octal	unix mode, e.g.	644 means rw-r--r--.

       --force-tls
	   If this flag	is specified and Wput is linked	with  the  OpenSSL-li-
	   brary, 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.

DIAGNOSTICS
       Normally,  the exit status is 0 if either everything went fine or there
       was nothing to do.  If some files were skipped during the  upload  (due
       to  timestamping	 or resume-rules) the exit status is set to 1. If some
       files failed to be transmitted due to an	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.

BUGS
       You  are	welcome	to send	bug reports and	suggestions about Wput through
       the	Sourceforge	 Bugtracking	  System:	http://source-
       forge.net/tracker/?group_id=141519

       Please send all available information that might	concern	this bug (e.g.
       Operating System	and what can be	done to	reproduce the  error).	Supply
       also  the  debug-output	(but  remove  confidential data	if any), which
       helps a lot analysing the problem. If you use a wputrc file,  it	 might
       also be useful to provide the relevant parts of it.

       If  there  is  a	crash due to a segfault	or similar, try	to run it in a
       debugger, e.g. gdb `which wput` core and	type where to  get  the	 back-
       trace.  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.

SEE ALSO
       Many options can	be set in a wputrc file. For its documentation consult
       the sample file provided	by Wput.  There	are some USAGE.* files in  the
       doc/  directory	of Wput. These contain further information and samples
       on how to use Wput.
AUTHOR
       Wput is written by Hagen	Fritsch	<fritsch+wput-man@in.tum.de>

Hagen Fritsch			     0.6.2			       wput(1)

NAME | SYNOPSIS | DESCRIPTION | URL-Input-Handling | Guessing Local File | OPTIONS | DIAGNOSTICS | BUGS | SEE ALSO | AUTHOR

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=wput&sektion=1&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help