2009-07-29 17 views
1

私は(洗練された)FTP配布スクリプトを書いていますが、これはできません。私は車輪を再発明している!制御された条件で中央の場所からリモートサーバーにファイルを確実に配布することは、コンピュータと同様に古いことです。FTP配布スクリプト

誰かが私を正しく証明してください。

この件に関するGoogleの検索は、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. 
+0

サーバへのsshアクセス権がある場合、私はrsyncを使用しようとします。これは、そのタスクにはるかに適しています。 – OneOfOne

+2

あなたの問題は何ですか? – ghostdog74

答えて

2

あなたはlftpが役立つことを見つけるかもしれません。これは多くのディストリビューションにデフォルトでインストールされ、かなり洗練された機能を提供します。

+0

また、lftp over ncftpをお勧めします。どちらもきれいですが、lftpはLinux上でより広く使用される傾向があります。 (例えば、UniverseではなくUbuntu Mainにあります。) – alberge

+0

lftpは本当においしいですね、ありがとう!私はそれが私の会社Unixサーバで利用可能であることを願っています。私はこの月曜日にチェックする必要があります。 – ExpertNoob1

0

私はExpectを使用したいと思っていましたが、AFAIKはほとんどのUnix上で利用でき、Linuxにインストールされています。

関連する問題