Sharing Files on the Internet with ftp


Sharing Files on the Internet with ftp

Sharing files on the Internet with ftp is similar to getting files; instead of retrieving files, however, you give files to other people (Code Listing 12.3).

To share files on the internet with ftp:

1.

ftp ftp.raycomm.com

Open the FTP connection as shown in the previous section.

2.

youruserid

Log in with your userid.

3.

password

Enter your password.

4.

cd incoming

Use standard Unix directory commands (ls, cd, and so on) to move into the directory into which you want to put the files (Code Listing 12.3). incoming is often the right directory name to use, particularly on public FTP servers.

5.

binary

Set the file type. You'll want to use the binary file type for any files other than text or HTML files; use ascii for text or HTML.

6.

put myjokes.gz

Type put followed by the name of the file you're making available.

7.

quit

Type quit when you're done.

Code Listing 12.3. Using put, you can share your files with other people on the Internet.

[ejr@hobbes ejr]$ ftp ftp.raycomm.com Connected to www.raycomm.com. 220 ftp.raycomm.com FTP server (NcFTPd 2.1.2, registered copy) ready. Name (ftp.raycomm.com:ejr): ejray 331 User ejray okay, need password. Password: 230-You are user #8 of 100 simultaneous users allowed. 230- 230 Logged in. Remote system type is UNIX. Using binary mode to transfer files. ftp> cd incoming 250 "/home/ftp/pub/users/e/ejray/incoming" is new cwd. ftp> binary 200 Type okay. ftp> put myjokes.gz local: myjokes.gz remote: myjokes.gz 200 PORT command successful. 150 Opening BINARY mode data connection. 226 Transfer completed. 128889 bytes sent in 15.5 secs (8.1 Kbytes/sec) ftp> quit 221 C-ya! [ejr@hobbes ejr]$ 

Tips

  • On public FTP servers that accept incoming files, you might not be able to list the files in the incoming directory or see anything in there. In this case, you essentially just cast your file into a big open room and close the door. This allows FTP administrators to screen the incoming files before making them available for downloading.

  • You can use the mput command to make multiple files available.

  • If you're transferring a lot of files at oncesay, for example, you're moving all of your files from your old ISP to your new oneconsider using tar and gz to collect and zip up all of your files, and then transferring just a single file. See Chapter 13 for more information about these commands.

    Navigate in your local system (for example, to change to a directory containing files to put) with regular Unix commands like ls, pwd, and cd, prefaced with an !. For example, pwd would display the path and name of the current directory on the other system, and !pwd would display the path and name of the current directory on the local system.


Navigating with links

  • (or Enter) follows the currently highlighted link to a new page.

  • returns to the previous page.

  • moves the highlight down to the next link in the document.

  • moves the highlight up to the previous link in the document.

  • or scrolls down to the next page.

  • or scrolls up to the previous page.

  • quits links.





Unix(c) Visual Quickstart Guide
UNIX, Third Edition
ISBN: 0321442458
EAN: 2147483647
Year: 2006
Pages: 251

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net