Contact us |
Using ftp
In this exercise you will learn how to log on anonymously to an FTP server and download a file from the server using an “ftp” client program.. To use FTP1. Log on to your machine as root 2. Change directory to the “/usr/local/src/” directory 3. Create a new directory called “downloads “ under the “/usr/local/src/” directory. What is the command to do this? 4. Change directory to the newly created “downloads” directory [root@localhost src]# cd downloads 5. Type “ftp” to launch your ftp client. [root@localhost downloads]# ftp ftp> 6. To connect to the ftp server type: ftp> open < server-address> (Obtain the <server-address> from your instructor) ……… 220 localhost.localdomain FTP server (Version wu-2.6.2-5) ready. ……….. 7. Log in as an anonymous user. Type “anonymous” at the prompt: Name (10.4.51.29:root): anonymous 8. Type in any e-mail address at the password prompt and press enter Password: *************** 230 Guest login ok, access restrictions apply. Remote system type is UNIX. Using binary mode to transfer files. ftp> 9. Change to binary mode. Type: ftp> binary What is the output of the binary command and what is binary mode? 10. List the current directories on the ftp server. Type “ls” at the ftp prompt (ftp>): ftp> ls 227 Entering Passive Mode (10,0,4,5,16,103). 125 Data connection already open; Transfer starting. 11-23-43 10:23PM <DIR> images 11-02-43 02:20PM <DIR> pub 226 Transfer complete. 11. Change directory to the “pub” directory. Type: ftp> cd pub 12. Use the “ls” command to list the files and directories in the “pub” directory How many files and directories are in there now? 13. Download the file called “hello-2.1.1.tar.gz” to your local directory. Type “yes” at the prompt. ftp> mget hello-2.1.1.tar.gz mget hello-2.1.1.tar.gz? yes 227 Entering Passive Mode (10,0,4,5,16,252). 125 Data connection already open; Transfer starting. 226 Transfer complete. 389363 bytes received in 0.0745 secs (5.1e+03 Kbytes/sec) 14. Log off the ftp server and exit your ftp client. Type: ftp> bye 15. You will be thrown back into your local shell. 16. Make sure you are still in the “downloads” directory on your local machine. List the files in the downloads folder?
|
Login... |
||||