How To Use FTP
URLs for FTP
Clued-in people will write a URL as shorthand
for anonymous FTP:
ftp://ftp.us.kernel.org/pub/linux/kernel/v2.6/linux-2.6.21*
That does not mean that you should use a web browser,
and it does not mean that you should try typing that
as a command!
Instead, it means:
-
Use the ftp command to connect to the server
ftp.us.kernel.org
-
Once connected, change to the directory
/pub/linux/kernel/v2.6
-
Once there, get all the files named
linux-2.6.21*
The following provides step-by-step directions.
FTP, Step by Step
-
First of all, make sure that you are in an
appropriate place to download files.
Wherever you are, that's where they will be stored.
Perhaps you should first:
$ cd /tmp
- Use the ftp command:
$ ftp wherever.example.com
-
When you are prompted, log in.
Are you trying to use anonymous FTP?
Then use a username of ftp
and then give your e-mail address as the password.
-
Once connected, use the commands cd,
pwd, and
dir to find your way around.
The first two work the same way they do on Unix,
while dir acts like ls -l
(and therefore much like dir in a
Windows command window).
-
Use the command bin to make sure that
the server does not mangle your file with the unneeded
Windows-to-UNIX conversion.
-
If you want some feedback that things are really
happening during an otherwise long and boring
(and mysterious!) download,
turn on the printing of a "#" for every kilobyte
downloaded with the hash command.
-
To get only one file named whatever:
ftp> get whatever
-
To get many files without being prompted to type
"y" before each one:
ftp> prompt
ftp> mget *.rpm *.tar.gz
-
Are you instead trying to upload files?
Then you want to use
put
and
mput
instead of
get
and
mget
Still Baffled?
Click here to read the on-line FTP manual page.
That's the
OpenBSD
manual page, but it should be close enough for any
reasonable FTP client implementation.
Back to the UNIX page