今回はとりあえず、この教室のサーバで転送の実習を行うこととする。接続は、
$ ftp 172.16.1.3
として始める。すると、
Connected to 172.16.1.3. 220 sv003.ecs-riko.shimane-u.ac.jp FTP server (Version 6.2/OpenBSD/Linux-0.10) ready. Name (172.16.1.xxx:b00**):
331 Password required for b00**. Password:
230- Linux sv003 2.0.34 #2 Thu Jul 9 10:57:48 EST 1998 i686 unknown 230- 230- Copyright (C) 1993-1998 Software in the Public Interest, and others 230- 230- Most of the programs included with the Debian GNU/Linux system are 230- freely redistributable; the exact distribution terms for each program 230- are described in the individual files in /usr/doc/*/copyright 230- 230- Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent 230- permitted by applicable law. 230 User b00** logged in. Remote system type is UNIX. Using binary mode to transfer files. ftp>
ftp> cd tex
とすると、
250 CWD command successful. ftp>
ファイル名表示のlsなども利用できるので、適当にコマンドを入力して感触をつかみ、ファイル転送を実験してみること。例えば、
ftp> cd /tmp
としてみると、
250> CWD command successful.
としてきちんとコマンドが実行されるとsuccessfulが表示される。間違いがあるとそれを指摘したエラーメッセージが表示されるのでメッセージに従って訂正を行ったコマンドをもう一度入力すればよい。次に、
ftp> ls
とすると、
200 PORT command successful. 150 Opening ASCII mode data connection for '/bin/ls'. total 1083 drwxrwxwrt 2 root root 1024 Apr 25 21:17 .font-unix drwxrwxrwx 2 root root 1024 Apr 25 21:17 .iroha_unix srwxrwxr-x 1 nawate nawate 0 May 2 00:55 .konp0 -rw-rw-r-- 1 nawate nawate 1100757 Jun 16 12:16 hd.ps srwxr-xr-x 1 root root 0 Apr 25 21:17 jd_sockV4
ftp> get hd.ps
とすると自分の作業しているディレクトリにhd.psというポストスクリプト画像が保存される。転送を終了するときには、
ftp> bye
として接続を切る。