12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Transferring Files with FTP 393To download a file from the server (assuming you have permission to), use the get command. To retrieve several files on the server, use the command mget ,where is a list of files separated by spaces. One or all of the multiple files can bespecified with wildcards such as mget *.pdf.When downloading files, the files are saved to the current directory on the local system.By default, this is the directory you were in before you executed the lftp command. Afterlogged in to the FTP server, it is possible to change the local working directory with thelcd command. To determine what the local working directory is set to, usethe lpwd command.Uploading files to the server has a similar syntax: put or mput . The filescan either be specified relative to the current local working directory or the full path tothe files can be specified with the put and mput commands. Files are uploaded to thecurrent working directory on the server. To determine what directory this is, use the pwdcommand.TIPFor a complete list of lftp commands, refer to the man page with the man lftpcommand.Listing 19.3 shows an example FTP session. In this example, anonymous user access isgranted, and the get command is used to download the debuginfo RPM for xinetd.LISTING 19.3Example FTP Session$ lftp ftp.redhat.comlftp ftp.redhat.com:~> lsdrwxr-xr-x 4 ftp ftp 4096 Nov 04 2005 publftp ftp.redhat.com:/>cd pub/redhat/linux/enterprise/5Server/en/os/x86_64/Debuginfo/cd ok, cwd=/pub/redhat/linux/enterprise/5Server/en/os/x86_64/Debuginfolftp ftp.redhat.com:/pub/redhat/linux/enterprise/5Server/en/os/x86_64/Debuginfo> get xinetd-debuginfo-2.3.14-10.el5.x86_64.rpm314618 bytes transferred in 2 seconds (199.3K/s)lftp ftp.redhat.com:/pub/redhat/linux/enterprise/5Server/en/os/x86_64/Debuginfo>19Connecting via FTP Using the Desktop File BrowserTo connect to an FTP server using the desktop file browser, select Places, Connect toServer from the top panel of the desktop. Select Public FTP for anonymous user login orFTP (with login) for access via username and password authentication. Type the IPaddress or full hostname of the FTP server in the Server field as shown in Figure 19.2.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!