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

FreeBSD Manual Pages

  
 
  

home | help
weex(1)			    General Commands Manual		       weex(1)

NAME
       weex - fast WEb EXchanger non-interactive FTP and FTPS client

SYNOPSIS
       weex [ Options ]	HOSTID [HOSTID...]

DESCRIPTION
       weex is a utility designed to automate the task of remotely maintaining
       a web page or other FTP or FTPS archive.	With weex , the	maintainer  of
       a web site or archive that must be administered through FTP/FTPS	inter-
       action can largely ignore that process. The archive administrator  sim-
       ply  creates  a	local  directory that serves as	an exact model for the
       offsite data. All modifications and direct interaction is done  locally
       to  this	 directory structure. When the administrator wishes to coordi-
       nate the	data on	the remote site	with that of the  local	 model	direc-
       tory, simply executing weex accomplishes	this in	the most bandwidth-ef-
       ficient fashion by only transferring files that need updating. The pro-
       gram  will  create or remove files or directories as necessary to accu-
       rately establish	the local model	on the remote server.

       The mandatory HOSTID argument is	the user-defined name that  represents
       a  particular  FTP  account or configuration specified in the ~/.weexrc
       file. This file,	the contents of	which are described below, can	alter-
       natively	 be named ~/.weex/weexrc.  Multiple HOSTID arguments to	a sin-
       gle weex	command	are supported to affect	multiple archives or  configu-
       rations	in immediate succession. In addition, the actual HOSTID	can be
       substituted with	the number representing	its relative sequential	 posi-
       tion  in	 the  ~/.weexrc	file (the first	HOSTID definition is 1,	and so
       on).

OPTIONS
       Options at the command line take	precedence over	any specified  in  the
       configuration file.

       -d, --debug-config
	      Outputs the configuration	of each	hosts.

       -D, --debug-ftplib
	      Outputs messages from/to FTP server.

       -f, --force
	      If  the  caching	mechanism is inhibiting	the uploading of files
	      that should be transferred, this option will  force  the	actual
	      transfer to always occur.

       -h, --help
	      Outputs a	usage summary to stdout.

       -m, --monochrome
	      The  default  mode generates a helpful color coding based	on the
	      operation	being performed. This option suppresses	that.

       -r, --rebuild-cache
	      If cache file is broken, use this	to rebuild it.

       -s, --silent
	      The default mode outputs a helpful status	message	for  each  ac-
	      tion  taken, including file transfer progress meters.  This mode
	      suppresses output.

       -t, --test
	      Weex doesn't modify any remote files/directories.

       -V, --version
	      Prints the version of the	weex program.

CONFIGURATION FILE
       Because this program is meant to	be non-interactive, a properly set  up
       configuration  file  is	essential.  weex looks for this	file either in
       ~/.weexrc or ~/.weex/weexrc.

       The general format of the configuration file  is	 a  bracketed  section
       heading	followed  by  parameters that define that section's configura-
       tion. This section name is what is provided to weex at run time to  in-
       dicate  the  FTP	 arrangement  you  wish	to update. A parameter is only
       valid for the most recent section heading that preceded it. The	excep-
       tion  to	 this  is the [default]	section	which creates settings for un-
       specified parameters in every section. In the case of  parameters  that
       accept  multiple	 values, the default section augments any specifically
       designated values.

       Lines that begin	with the '#' character are safely ignored as comments.
       Neither section names nor parameter variables are case sensitive	in any
       way. Section names can not begin	with numbers. Some parameters  can  be
       assigned	multiple values. Where this is not possible, the last value is
       used. To	quote special characters, use  single  quotes  (')  or	double
       quotes  (").  To	 quote a particular quote symbol, use the other	quote.
       The general syntax format for the configuration file is:

       [hostid1]
	       Parameter1 = Value
	       # First method for multiple values
	       Parameter2 = Value
	       Parameter2 = Value
	       ...

       [hostid2]
	       Parameter1 = Value
	       # Second	method for multiple values
	       Parameter2 = {
		      Value
		      Value
	       }
	       ...

       [default]
	       Parameter = Value
	       ...

       PARAMETER LIST

       These parameters	are used to define the properties of a particular host
       configuration  named  in	brackets. When specifying directory names, the
       trailing	"/" is optional. Also, both files and directories (except  Sr-
       cDir and	DestDir) can be	specified with shell wildcards.	 When specify-
       ing files, if a file or file pattern is given without a path, it	is as-
       sumed  to  be available when encountered	in any directory.  If it is an
       explicitly specified path/file combination, the configuration is	avail-
       able  in	 that directory.  Files/directories except `SrcDir' and	`Dest-
       Dir' can	be specified as	both absolute path and relative	path. But  you
       must specify `SrcDir' and `DestDir' as absolute path.  When you want to
       specify `/public_html/ignoreme.html' as relative	path, you should spec-
       ify `./ignoreme.html' rather than `ignoreme.html'.  When	specifying bi-
       nary states, you	may use	any of the following: True/False, Yes/No, T/F,
       1/0. None are case sensitive.

       AsciiFile
	      Filename patterns	that will be transferred using ASCII mode. The
	      default mode for files not specified in this  way	 is  IMAGE(BI-
	      NARY) mode.

       AuthorizationName
	      If you are using an FTP proxy server that	requires challenge/re-
	      sponse authorization with	the nonstandard	AUTHORIZE and RESPONSE
	      commands,	set this parameter to your authorization user name (or
	      number).	After logging in to the	proxy, weex  will  prompt  you
	      with the challenge and read back a response.

       ChangePermission
	      The access permissions of	the files in the directories specified
	      with ChangePermissionDir are changed to this parameter. The for-
	      mat is a three digit octal number.

       ChangePermissionDir
	      Files  in	directories assigned to	this parameter will have their
	      access permissions changed after sending.	 Specify local	direc-
	      tories.

       ChdirAtConnection
	      Set `true' to change remote current working directory to DestDir
	      at connection.  If remote	current	working	directory  at  connec-
	      tion  is DestDir,	weex runs faster a bit by setting this parame-
	      ter to `false'.  Default is `true'.

       ConvToLower
	      If set to	`true',	the filenames are converted to lower case  be-
	      fore  sending.  This feature allows interaction with FTP servers
	      that do not support case sensitive filenames. If a  naming  con-
	      flict arises due to a lower case name already existing, an error
	      occurs. Furthermore, the cache is	totally	 unaware  of  original
	      uppercase	filenames.

       DestDir
	      Destination  directory  on  the remote FTP server	where the mir-
	      rored information	will be	sent. This setting corresponds to  the
	      "pwd" command on traditional FTP clients.

       Force  If  the  caching	mechanism is inhibiting	the uploading of files
	      that should be transferred, this option will  force  the	actual
	      transfer to always occur if set to `true'.

       FollowSymlinks
	      Set  `true'  to follow symbolic links.  Default is `false'. Sym-
	      bolic link of directory assumes a	file whose size	is 0  byte  at
	      default.

       FtpPassive
	      When it is `false', weex uses port mode instead of passive mode.
	      If the FTP server	doesn't	support	passive	mode, specify `false'.
	      (It may make transfer slower) Default is `true'.	(See also FAQ)

       HostName
	      Hostname	to  connect to.	The "ftp://" protocol specifier	is im-
	      plied and	shouldn't be used. An IP address is also valid and may
	      save lookup time.

       IgnoreLocalDir
	      This  parameter contains one or more protected local directories
	      that are completely ignored during the transfer process. This is
	      useful  if  you  want  to	have subdirectories that are part of a
	      project but don't	need to	be in the final, online	version	(i.e.,
	      old versions).

       IgnoreLocalFile
	      This  parameter contains one or more protected local file	speci-
	      fiers that  will	be  completely	ignored	 during	 the  transfer
	      process.

       IgnoreRemoteDir
	      This parameter contains one or more protected remote directories
	      that are completely ignored during the transfer process. This is
	      useful if	you want to have other material	on the remote FTP site
	      that is not related to the specific project that weex is dealing
	      with. This could include,	for example, data administered through
	      a	different FTP client or	process.

       IgnoreRemoteFile
	      This parameter contains one or more protected remote file	speci-
	      fiers  that  will	 be  completely	 ignored  during  the transfer
	      process.

       KeepRemoteDir
	      In their directories, files are not removed when they don't  ex-
	      ist in the local directory.

       LogDetailLevel
	      It  specifis how detail level weex records a log at.  Connection
	      and  disconnection  message  and	error  messages	  are	always
	      recorded.	 When weex finishes working correctly, it writes `Com-
	      plete' previous disconnection message.  If 1  or	less,  records
	      each  connection.	  If 2,	records	each directory.	 If 3 or more,
	      records each file	manipulated Default is 1.

       LoginName
	      Login name of the	account	on the FTP server.

       MaxRetryToSend
	      When weex	fails in sending a file, it retry to  send  the	 file.
	      The  maximum times of retrying is	this parameter.	 Default is 8.
	      Specify -1 to stop retrying.

       Monochrome
	      The default mode generates a helpful color coding	based  on  the
	      operation	being performed. A `true' setting suppresses that.

       NestSpaces
	      An  integer  that	controls the indent spacing of the output. The
	      default is 4.  If	you want to suppress it, specify  -1.  If  you
	      specify 0, weex uses 4. :-)

       OverwriteOK
	      If the FTP server	has trouble overwriting	files, set this	param-
	      eter to `false', and each	file will be deleted before a new ver-
	      sion is put in place.

       Password
	      Plaintext	 password  granting  access  to	the account. Note that
	      this file	uses no	special	 facilities  to	 safeguard  passwords.
	      Make sure	that the file permissions of a configuration file con-
	      taining passwords	are set	conservatively.	If  they  are  not,  a
	      warning  will  be	issued at execution.  If this parameter	is not
	      found, weex asks for it on the terminal.

       PreservePermissionDir
	      The access permissions of	the files in directories  assigned  to
	      this parameter will be copied to remote.	Specify	*local*	direc-
	      tories.

       RecordLog
	      When `true', weex	create a log.

       RenameOK
	      If this parameter	is set to `true', each file is uploaded	 under
	      the  temporary name `weex.tmp', then renamed to its correct name
	      only if the upload succeeds.  This avoids	the problem of a  user
	      getting  an  incomplete  file if he downloads from your Web site
	      while you	are uploading to it, and of incomplete files being up-
	      loaded  if  your	FTP  connection	breaks while weex is running .
	      The default is `false' since some	FTP servers might not  support
	      renaming.

       ShowHiddenFile
	      Set  `true'  to  get  hidden  files (starting with a dot)	on FTP
	      server which doesn't show	hidden files by	default.   Default  is
	      `false'.

       Silent The  default  mode outputs a helpful status message for each ac-
	      tion taken, including file transfer progress  meters.  A	`true'
	      setting suppresses output.

       SrcDir Top  of  the  source directory tree containing the local copy of
	      the information to be mirrored. This setting corresponds to  the
	      "lcd" command on traditional FTP clients.

       UseSSL If  set  to `true' use FTPS instead of FTP. Explicit AUTH	SSL is
	      used to encrypt the FTP session.	If it is not supported by  the
	      server, weex exits.

       UseSSLVerify
	      Verify  the server certificate. Abort if the verification	fails.
	      Defaults to `true'.

       UseSSLcafile
	      Path to the file containing CA certificates, for SSL certificate
	      verification.   If not specified,	defaults to /etc/ssl/certs/ca-
	      certificates.crt.

EXAMPLES
       Here is an example of what a typical .weexrc file might look like:

	#-=-=-=-=-=Sample Configuration	file=-=-=-=-=-
	# My favorite FTP account...
	[Ninja]
	HostName = ftp.ninja-rights.org
	LoginName = chrisxed
	Password = '"mYsEcReT!"'
	SrcDir = /home/chrisxed/project/weex
	DestDir	= /
	ASCIIfile = *.c
	IgnoreLocalDir = /home/chrisxed/project/weex/weex.devel
	IgnoreLocalDir = /home/chrisxed/project/weex/weex.old
	IgnoreLocalFile	= notes2myself.txt
	IgnoreRemoteDir	= /offsitearchive/

	# Another FTP account...
	[Veggie]
	HostName = ftp.vegetable-advocacy.com
	LoginNAME = waxedbean
	Password = "X'sBean"
	SrcDir = /home/chrisxed/project/legumes
	DestDir	= /souppot/

	# Global configuration settings
	[default]
	AsciiFile = {
	*.htm
	*.html
	*.txt
	*.asc
	}
	IgnoreLocalFile	= {
	*.bak
	*.tmp
	*.swp
	}

       With a configuration like this, executing:

       $ weex Ninja

       would cause the file system assigned to SrcDir to  be  completely  mir-
       rored on	the remote server.  Executing:

       $ weex ninja veggie

       would  cause  the FTP update to occur for the "Ninja" configuration and
       then for	the "Veggie" configuration. This could also be specified  like
       this:

       $ weex 1	2

NOTES
       Timestamp Cache Facility

       weex  implements	a cache	of file	timestamps from	Ver 1.6.0.  This makes
       updating	much faster when you have a lot	of files.  In  addition,  weex
       also  caches  directory	structure  and	file names from	Ver 2.5.0.  So
       never slow transfer even	if you have many directories and  files.   If,
       however,	you change the remote files with another FTP client or running
       weex is killed or weex is terminated by an error, the cache  file  will
       not  be	correct.  The simple solution to this problem is to remove the
       cache file (located in ~/.weex/weex.cache.HOSTNAME ) completely	or  to
       run weex	with option --rebuild-cache.

       Tested Operating	Systems

	 Debian	GNU/Linux 2.1
	 Red Hat Linux 5.1/5.2/6.0/6.1J
	 SuSE Linux 6.1/6.2/6.3
	 Linux Mandrake	6.1
	 FreeBSD(98) 3.0-RELEASE
	 FreeBSD 3.3-RELEASE
	 Solaris 2.5.1

AUTHOR
       This very handy program was written by:
	      Yuuki NINOMIYA <gm@debian.or.jp>

       The original man	page was written by:
	      Chris X Edwards <chrisxed@usa.net>

       The  copyright  of this software	and documentation belongs to Yuuki NI-
       NOMIYA.	It is released under the terms of the GNU General  Public  Li-
       cense  as  published by the Free	Software Foundation; either version 2,
       or (at your option) any later version.  You can redistribute it	and/or
       modify it under the GPL.

       This  software uses shhopt for parsing command line options.  Shhopt is
       released	under the Artistic License. You	may use	 it  separately	 under
       the Artistic License.

YN-cxe				  2000.05.22			       weex(1)

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | CONFIGURATION FILE | EXAMPLES | NOTES | AUTHOR

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

home | help