Page 257 - DCAP602_NETWORK_OPERATING_SYSTEMS_I
P. 257

Unit 13: FTP Server





          dir    List the files in the current directory on the remote computer.                notes
          ls     Same as ‘dir’, but shows less information sometimes.
          get    Copy a file from the remote computer to yours
          hash   Puts a ‘#’ on the screen for every <number> of bytes transferred. <number>
                 is 1024 in some cases, 2048 in others but is between 1024 and 4096 in most
                 cases.
                 Check  the  ftp  ‘help’  function  for  more  info  on  the  number  for  your
                 clientprogram.
          help   Gives help on the use of commands within the ftp program
          lcd    Change the directory on your computer (the ‘l’ is for local)
          lpwd   Shows the present working directory (pwd) on your computer (the ‘l’ is
                 for local). Note: this may not work on all machines. On a Unix machine,
                 try !pwd if lwpd doesn’t work.
          mget   Copy multiple files from the remote computer to yours

          pwd    Shows the present working directory (pwd) on the remote computer



              Task     “Using FTP Clients to test anonymous read access.” Comment

          procedure

          Anonymous FTP is a facility offered by many machines on the Internet. This permits you to log
          in with the user name ‘anonymous’ or the user name ‘ftp’. When prompted for a password, type
          your e-mail address -- it’s not necessary, but it’s a courtesy for those sites that like to know who
          is making use of their facility. Be courteous. Some sites require a valid e-mail address, others
          don’t.
          You can then look around and retrieve files. (Most anonymous ftp sites do not permit people to
          store files). Note that when you retrieve files, you have to know where the files are going to end
          up on your machine. This is where the ‘lpwd’ command comes in handy. Also note that when
          you have transferred a file that you want to use on your PC, but you run ftp from a Unix machine
          (or a similar mainframe or network machine), you will have to ftp the file from the Unix machine
          to your PC first (this is assuming that you can’t ftp to outside your company or campus from
          your PC, otherwise you could have gotten the file directly to the PC).
          This may sound silly, but sometimes people don’t know where their files are stored or a system
          administrator decides to give ftp access to only a few systems.
          Typically, a directory called ‘pub’ is where the interesting things are stored. Some sites will have
          a file with a name like ls-lR, that contains a complete list of the files on that site. Otherwise, you
          can type ls -lR and get such a listing – for some sites, this can take a LONG time (the size of the
          resulting file can be anywhere between approximately 2000 bytes and 25Mb).
          When retrieving non-text files, you must use binary mode, otherwise the file gets messed up. To
          do this, use the ‘binary’ command. (It’s safe to set this for text files, but the result might look a bit
          different from an ASCII transfer)
          If the site at the other end is non-Unix, you may need to use some other mode -- see the documents
          or README files for that site and for FTP (common other modes, are LZ for  VAX Multinet
          servers, tenex or image for some others).






                                           LoveLy professionaL university                                   251
   252   253   254   255   256   257   258   259   260   261   262