FTP user manual
FTP stands for File Transfer Protocol and is a rather old internet standard for transfering files between two computers. FTP predates the World Wide Web, that's why Aminet started out as a network of FTP servers long before it got a web interface.
These days, you no longer need to rely on FTP to download or upload programs from/to Aminet. But FTP might still be useful if you need to transfer lots of files at once, as most FTP clients are perfectly capable of transfering lots of files without requiring any user interaction between the individual downloads.
To connect to a FTP server such as Aminet, you need a FTP client. With such a client, you can connect to the server, browse through its directory structure and download or upload files.
NOTE: This page urgently needs to be rewritten, it currently shows the old FTP.readme written by Urban Mueller, last updated in early 1997
Updated: Jan 97 - File splitting methods (Chapter 9) Updated: Dec 95 - GUI FTP clients mentioned (Chapter 1) - New FTP site list (Chapter 3) 0. Contents =========== 1. Introduction 2. FTP command list 3. Important sites 4. A Sample Session 5. The .netrc File 6. Archivers 7. The Archie Database 8. Mailservers 9. Transferring to Amiga 1. Introduction =============== FTP stands for File Transfer Protocol. The program with the same name, 'ftp', allows you to gain access to some other machines and store and/or retrieve files. If you have a computer with a connection to the Internet, and a program called 'ftp' on that computer, you're almost done. There are some other 'ftp' programs ('ncftp', 'AmFTP', 'AmiFTP', 'DaFTP' and 'GUI-FTP' on the Amiga, 'WS-FTP' on the PC, 'NCSA telnet' and 'fetch' on the Mac). If you have none of these, you have to get the files by mail: see the section 'Mailservers', below. In this document, we refer to two computers: o The 'local machine' is the computer that you are physically logged in on. o The 'remote machine' is the computer that you are contacting via your local machine. It might be right next door, or thousands of kilometers away! Using 'ftp', you can transfer files from the remote machine to your local machine, or from your local machine to the remote machine. Normally, one needs an account on a remote machine to use it. However, a number of machines on the Internet allow anybody to log in as the user 'ftp' or 'anonymous'. When you log in using the anonymous account, you'll be prompted for a password. You should type your local login name as the password, especially when you upload (ie send files). After doing so, you may retrieve all files found in public areas on the remote machine. Doing this is commonly called 'using anonymous ftp' or 'doing some anonymous ftp-ing'. The ftp program gives you a prompt that looks like this: ftp> At this prompt, you can type commands to connect to remote machines, upload and download files, etc. If you're on a UNIX system, you may want to look at the 'GUI' Aminet frontend instead of using FTP. Just compile pub/aminet/misc/unix/adt.c from Aminet (ftp.wustl.edu) on your UNIX box. Another nice way to access FTP sites is FTPMount (comm/tcp/FTPMount*). FTPMount is an FTP client implemented as a filesystem. Mounted as FTP:, it allows you to access FTP sites as if they were DOS devices, meaning that you are not tied to one FTP client but can use Workbench, DOpus, Shell or whatever you like for your FTP access. Downloading and extracting an Lha archive can be done as simple as Lha x ftp://ftp.wustl.edu/pub/aminet/mus/midi/GMPlay.lha without wasting the time and disk space to download the file first. 2. FTP command List =================== Here are some important commands you'll need within ftp. In these examples, any words given inside angled brackets <like this> are like variables that stand for particular values. For example, the command get <remote file name> means you should type the word "get" followed by the name of a file that is on the remote machine. An actual example would be: get SuperProgram.lha Commands For Opening And Closing FTP Connections: open <site> Connects to a remote machine. For valid sites, see below. close Closes connection to the remote site bye Quits FTP. quit Same as bye. Commands For Setting The Transfer Mode bin Sets the connection to binary mode for transferring non-text files, such as "lha", "lzh", "zoo", "arc", "dms", "zom", "Z" (compressed), "gz", "tar", and other archives. See the "Archivers" section below. asc Sets the connection to text (ASCII) mode for transferring text files. It is OK to transfer text files in "bin" mode. However, it is WRONG to transfer binary files in "asc" mode -- they will get all messed up. So to be safe, you can just type "bin" at the beginning of each ftp session and leave it that way. Commands For Downloading (Getting, Receiving) Files: get <remote file name> Receives the named remote file. This command cannot transfer multiple files at a time; for that, see "mget". If you specify a second argument, it will be used as the name for the local file. (By default, the local file has the same name as the remote file.) mget <remote file 1> <remote file 2> ... Receives all the above remote files with a single command. mget <pattern> Receives all the remote files whose names match <pattern>. Patterns may include the symbols * stands for any sequence of characters ? stands for any 1 character For example, if you wanted to download all files that begin with "B" and end with ".lzh", type: mget B*.lzh To download all files whose names are exactly 4 characters long, type: mget ???? You will be prompted before each file is downloaded. To turn off this prompting, see the "prompt" command below. Commands For Uploading (Putting, Sending) Files put <local file name> Transmits the local file to the remote machine. This works for only one file at a time, similarly to the way "get" works. If you specify a second argument, it will be used as the name for the remote file. (By default, the remote file has the same name as the local file.) mput <local file 1> <local file 2> ...etc. Transmits all the above local files to the remote machine with a single command. mput <pattern> Transmits all local files whose names match the given pattern. See the "mget" command, above, for information about patterns. Additional Commands For Uploading And Downloading prompt Normally, mget and mput will prompt you before transferring each file. If you don't like this, the 'prompt' command toggles the prompting on and off. hash Normally, files are downloaded silently. Typing the 'hash' command will cause a 'hash mark' to be printed every so often, indicating how much downloading has completed so far. Typing this command again toggles the hash marks on and off. Commands For Exploring The Local And Remote Machines Files on the remote machine (and probably your local machine too) are organized in directories. Here is how to navigate those directories and view their contents. dir <pattern> Lists files in the current directory of the remote machine. See "mget", above, for information about patterns. ls <pattern> Same as "dir", but list the files in a short format. cd <directory name> Changes your current directory on the remote machine. lcd <directory name> Changes your current directory on the local machine mkdir <directory name> Creates a new directory on the remote machine. This will not work if you do not have permission to do it on the remote machine. Some Special And Helpful Functions o There are some special arguments you can add to the 'get' command. If you type: get myfile - then file 'myfile' will be displayed on your screen instead of downloaded. If you would like this file to be displayed one screen at a time, pausing after each screenful, type get myfile |more [NOTE -- NO SPACE BETWEEN THE '|' and 'more']. This latter command may not work on all remote machines. o Also note that the ls and dir commands take only one argument. This can be either an option or a pattern, BUT NOT BOTH. If you give a second argument, this will be interpreted as a local filename, and the directory listing will be stored in that local file instead of displayed on your screen. Fix: If you have multiple arguments, enclose them in double quotes. 3. Important Sites ================== Location Name Alias IP Files USA us.aminet.net ftp.wustl.edu 126.96.36.199 ALL Germany de.aminet.net ftp.uni-paderborn.de 188.8.131.52 ALL UK uk.aminet.net ftp.plig.net 184.108.40.206 ALL Italy it.aminet.net ftp.unina.it 220.127.116.11 ALL Sweden se.aminet.net ftp.sunet.se 18.104.22.168 ALL France fr.aminet.net aminet.club-internet.fr 22.214.171.124 ALL USA us2.aminet.net aminet.hack.net 126.96.36.199 ALL Germany de1.aminet.net ftp.xnc.com 188.8.131.52 ALL Germany de2.aminet.net ftp.cs.tu-berlin.de 184.108.40.206 35000 Germany de3.aminet.net ftp.uni-erlangen.de 220.127.116.11 35000 Germany de5.aminet.net ftp.uni-bremen.de 18.104.22.168 2500 Germany* de6.aminet.net ftp.uni-stuttgart.de 22.214.171.124 2000 Germany de7.aminet.net aminet.a500.de 126.96.36.199 2000 The above group of sites together are called 'Aminet'. You find the Amiga files in the pub/aminet/ directory on each site. They all contain the same files (through a process called 'mirroring'), although most of them delete older files. 4. A Sample Session =================== This is an example FTP session. What you have to type is given in square brackets, on a line by itself, like this: [Here is something that you would type] Everything else is displayed by the computer. FTP output is often preceded by strange numbers like "220" and "150" -- you can ignore these. The example begins here. [ftp] ftp> [open wuarchive.wustl.edu] Connected to wuarchive.wustl.edu. 220 amiga FTP server (Version 5.60.97 Wed Dec 9 22:23:21 MET 1992) ready. Name (amiga:umueller): [ftp] 331 Guest login ok, send your userid as password. Password: [kdalton] 230- Welcome to amiga.physik anonymous FTP server 230- ..... 230 Guest login ok, access restrictions apply. ftp> [cd pub/aminet] 250 CWD command successful. ftp> [get RECENT |more] 200 PORT command successful. 150 Opening ASCII mode data connection for RECENT (5676 bytes). | Recent uploads to wuarchive.wustl.edu [188.8.131.52] on 11-Dec-1992 | The last 7 days' uploads, newest first. Blank line=new day, + = long .readme | |File Dir Size Description |------------------- --- ---- ----------- tiff2iff.lha gfx/conv 7K Converts TIFF files to Amiga IFF DNetIRCpic.lzh comm/net 16K Demo picture of DNet IRC DNetIRC.lha comm/net 88K+IRC intuition DNet client (dnetlib.o neede ICoons_Nofp.lzh gfx/3d 172K+Spline based object modeller (no 68881 nee 1993.lha mods/u4ia 109K+ProTracker Module By U4ia called '1993' skick321.lha os20/util 37K+Soft-kicker under OS 2.0 - new release monoxyde.dms demo/mega 477K+MONOXYDE - new demo by Vanish baudbandit1.4b.lha comm/misc 16K+Version 1.4b of baudbandit.device jed206b.lha util/edit 144K+programmable, programmers editor. OS2.0+ --More-- [q] 226 Transfer complete. local: |more remote: RECENT 5763 bytes received in 4.5 seconds (1.2 Kbytes/s) ftp> [cd game/think] 250 CWD command successful. ftp> [bin] 200 Type set to I. ftp> [get t-triz.lzh] 200 PORT command successful. 150 Opening BINARY mode data connection for t-triz.lzh (56496 bytes). 226 Transfer complete. local: t-triz.lzh remote: t-triz.lzh 56496 bytes received in 0.43 seconds (1.3e+02 Kbytes/s) ftp> [bye] 221 Goodbye. This is the end of of the sample session. If you're looking for something specific on that site, check the appropriate directory (using the 'cd' and 'ls' commands), or download the remote files 'INDEX', 'LOCAL' or 'ls-lR.Z'. You can then use a program such as the UNIX 'grep' to search for filenames in them. (Type 'man grep' in the UNIX shell to learn about grep). 5. The .netrc File ================== If you put a file named .netrc in your home directory on the local machine, it will make your ftp life easier. Just put into this file all information about how to log in at your favourite FTP site, and it'll be done automatically when you ftp to that site. After you create the .netrc file, you have to 'chmod 600 .netrc' or it won't be accepted: cd chmod 600 .netrc Here's an example .netrc file to log onto the machine wuarchive.wustl.edu. It also defines a macro called 'init' that turns on binary mode and changes your remote directory to pub/aminet. To use this macro after you are logged into the remote machine, just type $init machine wuarchive.wustl.edu login ftp password kdalton macdef init bin cd pub/aminet Make sure you put a blank line after the last command, or else it won't work properly. Also, remember to set the password to your login name. 6. Archivers ============ Most files on FTP sites store their files in archived (compressed) format. You can recognize the archiver used by the ending of the file name. These are the most important ones: Suffix Archiver Filename on Aminet .lzh LhA LhA_e138.run .lha LhA LhA_e138.run .zoo Zoo zoo2-10.lzh .zip Zip unzip-4.1.lzh .lzx LZX lzx121.lha .dms DMS dms111.sfx .run (LhA) - .sfx (LhA) - .tar.Z tar, compress tar-compress.lzh .gz GNU Zip gzip124x.lha The AmigaDOS versions of those archivers can be found on the AmiNet sites (see above) in the directory pub/aminet/util/arc, except for GNU Zip which is found in pub/aminet/util/pack. To give you a start, LhA is also stored in self-extracting form (.run or .sfx). Just execute it to extract it. UNIX versions of most of these archivers are available. You can get them from wuarchive.wustl.edu in the directory /pub/aminet/misc/unix/, or if they're not there, use archie (see below) to find them. The files names are: LhA lha-1.00.tar.Z Zoo zoo-2.10.tar.Z Zip unzip41.tar.Z Dms dmscheck.c.Z 7. The Archie Database ====================== There is a database of all files on all FTP sites worldwide, called 'archie'. They have a mailserver, a telnet service, and a client software. Telnet to archie.sura.net and log in as 'archie', or send mail containing HELP in its body to firstname.lastname@example.org. You'll get more information that way. However I no longer recommend the use of archie for Amiga files, the Aminet search facilities are sufficient. 8. Mailservers ============== Some sites allow sending them magic mail messages which cause them to FTP things from other sites, uuencode them, and send them to you. Others only send the files stored locally at that site. Here are the most important mail servers. Send a mail containing HELP in its body to find out more about them (note that many German links are slow): These Aminet sites offer binaries by email. (Mail servers only send you files from that site while ftpmail services can connect to others) email@example.com (Keeps complete Aminet locally) firstname.lastname@example.org (Keeps complete Aminet locally) email@example.com firstname.lastname@example.org email@example.com firstname.lastname@example.org email@example.com firstname.lastname@example.org And here some other ftpmail services that you can use to connect to Aminet sites: email@example.com firstname.lastname@example.org ftpmail@ftp.Dartmouth.EDU ftpmail@ftp.SHSU.edu email@example.com 9. Transferring to Amiga ======================== VIA MODEM After you have the files on your UNIX account, you need to get the files home. Most Amiga terminal programs have one or more ways to transfer files to your Amiga. Read your terminal program documentation for more information. One recommended method is to use ZModem. If your local machine has the 'sz' command, and your terminal program supports ZModem, you are set. To download the file 'whatever.lzh' to your Amiga, type: sz whatever.lzh and then use your terminal program to receive it. If your site does not have 'sz', you can get it from krynn.efd.lth.se in the file /pub/modem/rzsz9107.tar.Z. Compile it, or use archie to find a version specific for your UNIX flavor. In the worst case, you can turn on your terminal program's "screen capture" feature and type: uuencode <filename filename to get your file typed to the screen in 'uuencoded' format. On your Amiga, uudecode the file (using uudecode from Fish Disk 92). Also, some sites still use 'kermit'. If you have a program of that name, you can use one of the Amiga kermit implementations found on Aminet to get files home. VIA FLOPPY If you don't have a modem, you can try to find a workstation with 3.5" floppy drive. Sun 4 computers have them. There you can either use the program mtools (try 'man mcopy') to store the files in MSDOS format and retrieve them using MSH (Fish Disk 382) or CrossDOS (included with AmigaDOS 2.1 and higher), or you use gnu tar (UNIX version to be found on decuac.dec.com, /pub/binaries/gnutar-1.10.tar.Z) to store files on the disk in .tar format using the command 'gtar cfvM /dev/rfd0c'. Then you restore the files with gnu gtar (found on wuarchive.wustl.edu, in the file pub/aminet/util/gnu/gtar110.lzh) and the FLAT device (Fish Disk 535) and MSH (or any other PC format reading tool). Mount FLAT:, and then enter 'gtar xfvM flat:MSH' or replace the MSH by the name of your emulation tools. If a file is too large to fit on a floppy, you can use misc/unix/bsplit* from Aminet to split it, and c:join under AmigaDOS to put it back together. You could also use util/misc/chunker.lha which comes complete with source and MSDOS binaries. Under MSDOS, you can use the command 'backup' to save files onto floppies and misc/emu/pcres250.lha from Aminet to restore the backups on the Amiga side. This method automatically splits large files. Another way is to use the utility misc/emu/splitm.zip to cut the files into handy pieces. If you'd like some additional info to be included in this FAQ, contact firstname.lastname@example.org. -Urban Mueller