110 likes | 274 Views
Agenda. Using FTP What is FTP? How to Use the FTP Program How to transfer files Using FTP. File Transfer Protocol (FTP). What is FTP? FTP is an application that can transfer files among various computer systems FTP is useful for:
E N D
Agenda • Using FTP • What is FTP? • How to Use the FTP Program • How to transfer files Using FTP
File Transfer Protocol (FTP) What is FTP? • FTP is an application that can transfer files among various computer systems • FTP is useful for: • transferring programming files to diskette for printing, backup, or installation on home PC • transferring files from Phobos to PC for editing(and vice versa) • uploading HTML files to a web server
File Transfer Protocol • There are many ftp applications that are available in both Windows and Linux platforms • Windows: • - Graphical (WS-FTP, MS-Explorer) • - Command line (ftp command) • Linux: • - Graphical (Konqueror, gftp) • - Command line (ftp command) Basically, identical to MS-Windows command-line ftp command!
ftp Command • Very useful command since it is available in MS-Windows, Unix, and Linux • Useful to learn if you want to transfer file(s) and no other ftp software is currently installed on computer (eg. if you are working at a client’s site)
ftp Command • To connect to a remote server for file transfer, either open a Windows Run command dialog box, or in Unix/Linux access a shell and issue the following command:ftp servername • Eg. ftp phobos.senecac.on.ca
ftp Command • After entering your username and password, you will be brought to a prompt • If you will be transferring ascii files such as C programming code, or html webpages, issue the command ascii • If you will be transferring files other than ascii files (pictures, MS-Word documents, executable programs), issue the command binary. If you do not enter the “mode” to correctly transfer these files, the transferred files may be damaged, and they may not work properly!
ftp Command • When you are connected to a server the following terms apply:Local Server – Your current machine (e.g. your PC or your Matrix account)Remote Server – Server to which you are connected (e.g. your Phobos account) Note: If your local machine has access to a floppy disk drive, you can transfer files for backup purposes!
ftp Command • Commands to navigate throughout your remote server:ls List filespwd Display current directorycd Change remote directory Note: when using ftp program in MS-Windows, you can use dir command as well.
ftp Command • Commands to navigate throughout your local server:!ls List files (if local is Unix/Linux)!pwd Display current directorylcd Change local directory Note: When using ftp from MS-Windows, use !dir to view local contents
ftp Command • Commands to transfer files between local and remote server:remote -> local Server:get filenamelocal -> remote Server:put filename Note:It is advisable to set your local and remote directories before you transfer. In MS-Windows the local directory is set by default to root directory in C: drive. In Unix/Linux the local directory is set by default to current directory from which “ftp” was entered. The remote directory is set by default to the user’s home directory.
ftp Command • After transferring a file between servers, always verify that the transfer has been successfully completed (refer to commands to navigate throughout local and remote servers) • To exit from the ftp command, you can enter the command: bye