Chapter 12. Accessing Network Resources
In the time it takes to fire up a graphical FTP client, you could already have down-loaded a few dozen files from a remote server using command-line tools. Even when a GUI is available, commands for transferring files, web browsing, sharing directories, and reading mail can be quick and efficient to use. When no GUI is available, they can be lifesavers.
This chapter covers commands for accessing resources (files, e-mail, shared directories, and online chats) over the network.
Transferring Files
Commands available with Mac OS X for downloading files from remote servers (HTTP, HTTPS, FTP, or SSH) are plentiful and powerful. You might choose one command over another because of the specific options you need. For example, you may want to perform a download over an encrypted connection, resume an aborted download, or do recursive downloads. This section describes how to use wget, ftp, scp, and sftp.
Downloading Files with wget
Sometimes you need to download a file from a remote server using the command line. For example, you find a link to a software package but the link goes through several HTTP redirects that prevent rpm from installing straight from HTTP; or you may want to script the automated download of a file, such as a log file, every night.
The wget command can download files from web servers ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access