我开始写一个(复杂的)FTP分发脚本,但我想:这不可能!我正在重新发明轮子!从中央位置在受控条件下可靠地将文件分发到远程服务器,这与计算机一样重要,该死的!
请有人证明我是对的。
关于这个主题的谷歌搜索被Linux世界所破坏,过度使用“发布”一词。
另外,我了解rsync和rdist的所有内容。在这里我受限于FTP,所以请不要建议那些。
只是为了表明我在说什么,这是我的(空)脚本的标题:
# Example usage: FTPdist.ksh --simulate -l /tmp/Script.sh -r $BIBSH_DIR -d dune,camel -p dgft4sG55 -e expNoob -o itg:itg -c 555
#
# usage: FTPdist.ksh <-l local_file1[,lf2,..]> <-r remote_path> <-d remote_srv1[,remote_srv2,..]> [-t trace_file]\
# <-p FTP_passwd> [-u FTP_login] [-e ext] [-n] [-o owner[:group]] [-c mode] [-g] [-q] [-v [verbosity_level]]
# or: FTPdist.ksh <-f instructions_file> [-n] [-t trace_file] <-p FTP_passwd> [-u FTP_login] [-e ext]
# [-o owner[:group]] [-c mode] [-g] [-q] [-v [verbosity_level]]
#
# By default, FTP_login is "root".
# -n: do a simulation run to see if any FTP/login/rights problems exist.
#
# Distribute <local_file> to all <remote_srvs> using FTP. Target location on remote servers: <remote_path>.
# If a file already exists on remote server, rename it first with date extension + .[ext].
# By default, ownership is preserved. If -o option is provided, ownership will be given to argument.
# This script is meant to connect as root . If you're not using root FTP login, make sure you have
# enough privileges on remote servers/files (do a simulation first with -n).
# If -c option is used, a chmod is performed on the remote file.