From 75a4a592e5ccda30715f93563d741b83e0dcf39e Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Mon, 25 Apr 2011 13:37:00 +0000 Subject: Slackware 13.37 Mon Apr 25 13:37:00 UTC 2011 Slackware 13.37 x86_64 stable is released! Thanks to everyone who pitched in on this release: the Slackware team, the folks producing upstream code, and linuxquestions.org for providing a great forum for collaboration and testing. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. As always, thanks to the Slackware community for testing, suggestions, and feedback. :-) Have fun! --- slackbook/html/basic-network-commands-ftp.html | 279 +++++++++++++++++++++++++ 1 file changed, 279 insertions(+) create mode 100644 slackbook/html/basic-network-commands-ftp.html (limited to 'slackbook/html/basic-network-commands-ftp.html') diff --git a/slackbook/html/basic-network-commands-ftp.html b/slackbook/html/basic-network-commands-ftp.html new file mode 100644 index 000000000..a5b48f073 --- /dev/null +++ b/slackbook/html/basic-network-commands-ftp.html @@ -0,0 +1,279 @@ + + + + +FTP Clients + + + + + + + + + + + +
+

13.9 FTP Clients

+ +

FTP stands for the File Transfer Protocol. It allows you to send and receive files +between two computers. There is the FTP server and the FTP client. We discuss the client +in this section.

+ +

For the curious, the “client” is you. The “server” is the +computer that answers your FTP request and lets you login. You will download files from +and upload files to the server. The client cannot accept FTP connections, it can only +connect to servers.

+ +
+

13.9.1 ftp

+ +

To connect to an FTP server, simply run the ftp(1) command +and specify the host:

+ + + + + +
+
+% ftp <hostname> [port]
+
+
+ +

If the host is running an FTP server, it will ask for a username and password. You can +log in as yourself or as “anonymous”. Anonymous FTP sites are very popular +for software archives. For example, to get Slackware Linux via FTP, you must use +anonymous FTP.

+ +

Once connected, you will be at the ftp> prompt. There +are special commands for FTP, but they are similar to other standard commands. The +following shows some of the basic commands and what they do:

+ +
+

Table 13-1. ftp commands

+ + +++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CommandPurpose
lsList files
cd <dirname>Change directory
binSet binary transfer mode
asciiSet ASCII transfer mode
get <filename>Download a file
put <filename>Upload a file
hashToggle hash mark stats indicator
tickToggle byte counter indicator
promToggle interactive mode for downloads
mget <mask>Download a file or group of files; wildcards are allowed
mput <mask>Upload a file or group of files; wildcards are allowed
quitLog off the FTP server
+
+ +

You can also use some of the following commands which are quite self-explanatory: chmod, delete, rename, rmdir. For a complete list of all +commands and their meaning, just type help or ? and you'll see a complete listing on screen.

+ +

FTP is a fairly simple program to use, but lacks the user interface that many of us +are used to nowadays. The man page discusses some of the command line options for ftp(1).

+ + + + + +
+
+ftp> ls *.TXT
+200 PORT command successful.
+150 Opening ASCII mode data connection for /bin/ls.
+-rw-r--r--   1 root     100         18606 Apr  6  2002 BOOTING.TXT
+-rw-r--r--   1 root     100         10518 Jun 13  2002 COPYRIGHT.TXT
+-rw-r--r--   1 root     100           602 Apr  6  2002 CRYPTO_NOTICE.TXT
+-rw-r--r--   1 root     100         32431 Sep 29 02:56 FAQ.TXT
+-rw-r--r--   1 root     100        499784 Mar  3 19:29 FILELIST.TXT
+-rw-r--r--   1 root     100        241099 Mar  3 19:12 PACKAGES.TXT
+-rw-r--r--   1 root     100         12339 Jun 19  2002 README81.TXT
+-rw-r--r--   1 root     100         14826 Jun 17  2002 SPEAKUP_DOCS.TXT
+-rw-r--r--   1 root     100         15434 Jun 17  2002 SPEAK_INSTALL.TXT
+-rw-r--r--   1 root     100          2876 Jun 17  2002 UPGRADE.TXT
+226 Transfer complete.
+ftp> tick
+Tick counter printing on (10240 bytes/tick increment).
+ftp> get README81.TXT
+local: README81.TXT remote: README81.TXT
+200 PORT command successful.
+150 Opening BINARY mode data connection for README81.TXT (12339 bytes).
+Bytes transferred: 12339
+226 Transfer complete.
+12339 bytes received in 0.208 secs (58 Kbytes/sec)
+
+
+
+ +
+

13.9.2 ncftp

+ +

ncftp(1) (pronounced "Nik-F-T-P") is an alternative to the +traditional ftp client that comes with Slackware. It is still a text-based program, but +offers many advantages over ftp, including:

+ +
    +
  • +

    Tab completion

    +
  • + +
  • +

    Bookmarks file

    +
  • + +
  • +

    More liberal wildcard uses

    +
  • + +
  • +

    Command history

    +
  • +
+ +

By default, ncftp will try to log in anonymously to the +server you specify. You can force ncftp to present a login +prompt with the “-u” option. Once logged in, you +can use the same commands as in ftp, only you'll notice a nicer +interface, one that works more like bash.

+ + + + + +
+
+ncftp /pub/linux/slackware > cd slackware-current/
+Please read the file README81.TXT
+  it was last modified on Wed Jun 19 16:24:21 2002 - 258 days ago
+CWD command successful.
+ncftp ...ware/slackware-current > ls
+BOOTING.TXT               FAQ.TXT                   bootdisks/
+CHECKSUMS                 FILELIST.TXT              extra/
+CHECKSUMS.asc             GPG-KEY                   isolinux/
+CHECKSUMS.md5             PACKAGES.TXT              kernels/
+CHECKSUMS.md5.asc         PRERELEASE_NOTES          pasture/
+COPYING                   README81.TXT              rootdisks/
+COPYRIGHT.TXT             SPEEKUP_DOCS.TXT          slackware/
+CRYPTO_NOTICE.TXT         SPEEK_INSTALL.TXT         source/
+CURRENT.WARNING           Slackware-HOWTO
+ChangeLog.txt             UPGRADE.TXT
+ncftp ...ware/slackware-current > get README81.TXT
+README81.TXT:                                           12.29 kB  307.07 kB/s
+
+
+
+
+ + + + + -- cgit v1.2.3