(PuTTYユーザマニュアル) 7.3 バッチファイルやスクリプトでPlinkを使う - 7.3 Using Plink in batch files and scripts

http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter7.html#plink-batchの日本語訳。<< 7.2 Plinkを使う - 目次に戻る - 7.4 CVSでPlinkを使う >>

訳文

Plinkで対話型プロンプトを使わずにリモートサーバにログインできるようになれば(7.2.2節参照)、さまざまなスクリプト記述やバッチのために使えます。例えば、リモートマシンのバックアップを始めるために、以下のようなコマンドが使えます:

Once you have set up Plink to be able to log in to a remote server without any interactive prompting (see section 7.2.2), you can use it for lots of scripting and batch purposes. For example, to start a backup on a remote machine, you might use a command like:

plink root@myserver /etc/backups/do-backup.sh

あるいは、特定のweb領域に関連するシステムログの行をすべて取得したい場合:

Or perhaps you want to fetch all system log lines relating to a particular web area:

plink mysession grep /~fred/ /var/log/httpd/access.log > fredlog

サーバのコマンドラインで実行できる対話型でないコマンドは、Plinkを使ったバッチファイルでも同様に実行できます。

Any non-interactive command you could usefully run on the server command line, you can run in a batch file using Plink in this way.his option is only meaningful with the SSH-2 protocol.)

<< 7.2 Plinkを使う - 目次に戻る - 7.4 CVSでPlinkを使う >>