BÝLKENT UNIVERSITY

DEPARTMENT OF COMPUTER TECHNOLOGY AND PROGRAMMING

 

CTP203 Operating Systems

Spring 1999-2000

LAB ASSIGNMENT # 10

Instructor : Can Uður AYFER

Assistant : Ece YARGI

Date : 1-2/05/00

Week : 13

FTP PROGRAM

ftp is the user interface to ARPANET standard File Transfer Protocol (FTP). ftp transfers files to and from a remote network site. The client host, with which ftp is to communicate may be specified on the command line. If this is done, ftp immediately attempts to establish a connection to an FTP server on that host; otherwise, ftp enters its command interpreter and awaits instructions from the user. When ftp is awaiting commands from the user, it displays the prompt ‘ftp>’.

SYPNOSIS

ftp host_name

FTP COMMANDS

binary

Set the representation type to binary

bye

Terminate the FTP session with the remote server and exit ftp.

cd remote_directory

Change the working directory on the remote machine to remote_drirectory.

cd ..

Change the remote machine working directory to the parent of the current remote machine working directory.

close

Terminate the ftp session with the remote server.

dir [remote_directory][local_file]

print a listing of the directory contents in the directory remote_directory and optionally placing the output in local_file.

disconnect

A synonym for close.

get remote_file [local_file]

Retrieve the remote_file and store it on the local machine. If the local file name is not specified, it is given the same name it has on the remote machine.

 

 

help [command]

Print an informative message about the meaning of command. If no argument is given, ftp prints list of the known commands.

lcd [directory]

Change the working directory on the local machine. If no directory is specified, the user’s home directory is used.

ls [remote_directory | -al] [local_file]

Print an abbreviated listing of the contents of a directory on the remote machine. If no remote_directory is unspecified the current working directory is used.

mget remote_files

Expand the remote_files on the remote machineand do a get for each file name thus produced. See glob for details on the filename expansion.

mkdir directory_name

Make a directory on the remote machine.

mput local_files

Expand wild cards in the list of local files.

open host [port]

Establish a connection to the specified host ftp server. An optional port number may be supplied.

prompt

Toggle interactive prompting. Interactive prompting occurs during multiple file transfers to allow the user to selectively retrieve or store files. By default prompting is turned on. If prompting is turned off, any mget or mput will transfer all files and any mdelete will delete all files.

put local_file [remote_file]

Store a local file on the remote machine.

pwd

Print the name of the current working directory on the remote machine.

quit

A synonym for bye.

rmdir directory_name

Delete a directory on the remote machine.

? [command]

A synonym for help.