weex(1)
π weex β the manual, bestie edition π
part of the General Commands Manual β¨ (weex(1), in case you were wondering which page you're on π«Ά)
β¨ NAME β¨
weex β fast WEb EXchanger, aka a non-interactive FTP and FTPS client π
πΈ SYNOPSIS πΈ
weex [ Options ] HOSTID [HOSTID...]
π¦ DESCRIPTION π¦
okay so listen. weex is a utility built to automate the whole "remotely maintaining a web page or some other FTP or FTPS archive" situation. fr fr β if you're the maintainer of a web site or archive that has to be administered through FTP/FTPS interaction, this thing lets you largely ignore that process. iconic behavior honestly π
here's the vibe: the archive administrator just makes a local directory that serves as an exact model for the offsite data. all your modifications and all your direct interaction happen locally, in that directory structure. that's it. that's the whole thing.
then, whenever the administrator wants to coordinate the data on the remote site with the local model directory, they just run weex and it handles it in the most bandwidth-efficient fashion possible, because it only transfers the files that actually need updating π§β¨ the program will create or remove files or directories as necessary so the local model gets accurately established on the remote server. no cap.
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 alternatively be named ~/.weex/weexrc.
you can pass multiple HOSTID arguments to a single weex command btw, and that's supported, so you can affect multiple archives or configurations in immediate succession π
and get this β instead of the actual HOSTID, you can substitute the number representing its relative sequential position in the ~/.weexrc file. the first HOSTID definition is 1, and so on. lowkey genius π₯
π OPTIONS π
β οΈ heads up bestie: options at the command line take precedence over any specified in the configuration file. command line stays winning π
-d,--debug-configβ outputs the configuration of each hosts.-D,--debug-ftplibβ outputs messages from/to the FTP server. the whole convo, no filter π-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. like, always always.-h,--helpβ outputs a usage summary tostdoutβ¨-m,--monochromeβ the default mode generates a helpful color coding based on the operation being performed. this option suppresses that. (aesthetic loss tbh, but valid π)-r,--rebuild-cacheβ if the cache file is broken, use this to rebuild it π§-s,--silentβ the default mode outputs a helpful status message for each action taken, including file transfer progress meters. this mode suppresses output π€«-t,--testβweexdoesn't modify any remote files/directories. a little dry run moment π§ͺ-V,--versionβ prints the version of theweexprogram π
...and that's where this part wraps, bestie. more coming π«Ά
π CONFIGURATION FILE π
ok so bestie, listen up β this program is built to be non-interactive, meaning it is not gonna stop and chat with you while it runs. so a properly set up configuration file is, like, absolutely essential. no cap. weex goes hunting for it in either ~/.weexrc or ~/.weex/weexrc. β¨
the general format is a bracketed section heading followed by parameters that define that section's configuration. that section name is the exact thing you hand to weex at run time to say which FTP arrangement you wanna update. a parameter is only valid for the most recent section heading that came before it. the one exception? the [default] section, which creates settings for unspecified parameters in every section. and for parameters that accept multiple values, the default section augments any specifically designated values. it's giving teamwork. π
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 that's 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 config 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 define the properties of a particular host configuration named in brackets. when you're specifying directory names, the trailing / is optional. also, both files and directories (except SrcDir and DestDir) can be specified with shell wildcards. when specifying files, if a file or file pattern is given without a path, it's assumed to be available when encountered in any directory. if it's an explicitly specified path/file combination, the config is available in that directory. files/directories except SrcDir and DestDir 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 a relative path, you should specify ./ignoreme.html rather than ignoreme.html. when specifying binary states, you may use any of the following: True/False, Yes/No, T/F, 1/0. none of them are case sensitive. slay. π
AsciiFileβ filename patterns that will be transferred using ASCII mode. the default mode for files you don't list here is IMAGE(BINARY) mode. π¦AuthorizationNameβ if you're using an FTP proxy server that requires challenge/response authorization with the nonstandardAUTHORIZEandRESPONSEcommands, 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. very main character of it.ChangePermissionβ the access permissions of the files in the directories specified withChangePermissionDirare changed to this parameter. the format is a three digit octal number. π₯ChangePermissionDirβ files in directories assigned to this parameter will have their access permissions changed after sending. specify local directories.ChdirAtConnectionβ settrueto change the remote current working directory toDestDirat connection. if the remote current working directory at connection is alreadyDestDir, weex runs faster a bit by setting this parameter tofalse. default istrue. βConvToLowerβ if set totrue, the filenames are converted to lower case before sending. this feature allows interaction with FTP servers that do not support case sensitive filenames. if a naming conflict arises because a lower case name already exists, an error occurs. furthermore, the cache is totally unaware of original uppercase filenames. πDestDirβ destination directory on the remote FTP server where the mirrored information will be sent. this setting corresponds to thepwdcommand 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 totrue.FollowSymlinksβ settrueto follow symbolic links. default isfalse. a symbolic link of directory assumes a file whose size is 0 byte at default. πFtpPassiveβ when it'sfalse, weex uses port mode instead of passive mode. if the FTP server doesn't support passive mode, specifyfalse. (it may make transfer slower) default istrue. (see also FAQ)HostNameβ hostname to connect to. theftp://protocol specifier is implied 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. 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). the way that's so handy.IgnoreLocalFileβ this parameter contains one or more protected local file specifiers 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. useful if you want to have other material on the remote FTP site that isn't related to the specific project 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 specifiers that will be completely ignored during the transfer process.KeepRemoteDirβ in their directories, files are not removed when they don't exist in the local directory.LogDetailLevelβ it specifies how detail level weex records a log at. connection and disconnection message and error messages are always recorded. when weex finishes working correctly, it writesCompleteprevious 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 retries to send the file. the maximum times of retrying is this parameter. default is 8. specify-1to stop retrying. π₯Monochromeβ the default mode generates a helpful color coding based on the operation being performed. atruesetting 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 specify0, weex uses 4. :-)OverwriteOKβ if the FTP server has trouble overwriting files, set this parameter tofalse, and each file will be deleted before a new version 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 containing 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.
π bestie, real talk: this one is plaintext. lock those permissions down or weex will side-eye you with a warning at execution.
PreservePermissionDirβ the access permissions of the files in directories assigned to this parameter will be copied to remote. specify local directories.RecordLogβ whentrue, weex creates a log.RenameOKβ if this parameter is set totrue, each file is uploaded under the temporary nameweex.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 uploaded if your FTP connection breaks while weex is running. the default isfalsesince some FTP servers might not support renaming. πShowHiddenFileβ settrueto get hidden files (starting with a dot) on FTP server which doesn't show hidden files by default. default isfalse.Silentβ the default mode outputs a helpful status message for each action taken, including file transfer progress meters. atruesetting suppresses output.SrcDirβ top of the source directory tree containing the local copy of the information to be mirrored. this setting corresponds to thelcdcommand on traditional FTP clients.UseSSLβ if set totrue, use FTPS instead of FTP. explicit AUTH SSL is used to encrypt the FTP session. if it's not supported by the server, weex exits. π₯UseSSLVerifyβ verify the server certificate. abort if the verification fails. defaults totrue.UseSSLcafileβ path to the file containing CA certificates, for SSL certificate verification. if not specified, defaults to/etc/ssl/certs/ca-certificates.crt. π¦
β¨ EXAMPLES β¨
Okay bestie, here's what a typical .weexrc file might look like β study it, it's giving main character config energy π
#-=-=-=-=-=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
}
So with a configuration like this one, running:
$ weex Ninja
would cause the file system assigned to SrcDir to be completely mirrored on the remote server. No crumbs left behind, periodt. π₯
And running:
$ weex ninja veggie
would make the FTP update happen for the "Ninja" configuration first, and then for the "Veggie" configuration. You could also say it like this instead:
$ weex 1 2
π§ NOTES π§
β° Timestamp Cache Facility
weex implements a cache of file timestamps from Ver 1.6.0 β which makes updating so much faster when you've got a ton of files, like genuinely obsessed with the speed-up. On top of that, weex also caches directory structure and file names from Ver 2.5.0. So the transfer never gets slow, even if you have many directories and files. Slay. β¨
But lowkey listen: if you change the remote files with another FTP client, or if runningweexgets killed, or ifweexis terminated by an error, then 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 runweexwith the 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 NINOMIYA. It is released under the terms of the GNU General Public License 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.
And that's the whole thing, bestie β YN-cxe dropped this on 2000.05.22, and it's still out here living its weex(1) truth. Go mirror something. Mwah. πβ¨π
π¦ where this page comes from
- alpine 3.24: weex-doc 2.8.4.5-r0 Β· GPL-2.0-or-later
- debian bookworm: weex 2.8.4.2
- debian trixie: weex 2.8.4.4
- ubuntu jammy: weex 2.8.4.1
- ubuntu noble: weex 2.8.4.2build2
- ubuntu questing: weex 2.8.4.4
- ubuntu resolute: weex 2.8.4.5+nmu1 Β· GPL-2.0-or-later
- ubuntu stonking: weex 2.8.4.5+nmu1build1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms