This chapter discusses using four types of Internet services on the BeOS:
The chapter also discusses compressing and decompressing files for Internet use with tools integrated into the BeOS.
|If you haven't already configured your BeOS system for using the Internet, see the chapter "Connecting to the Internet With BeOS."|
This chapter discusses the following topics:
|Uniform Resource Locators (URLs)|
|Using World Wide Web Services|
|Using Internet File Sharing|
|Using Internet Mail Services|
|Using Telnet for Internet Remote Access|
|Compressing and Archiving Files|
The standard addressing mechanism the BeOS system uses to find any Internet service is the uniform resource locator, or URL. You're probably already familiar with its basic form; for example, the URL for Be's World Wide Web site is http://www.be.com/.
The first part of the URL, http://, stands for the hypertext transfer protocol, the basic web protocol. The second portion, www.be.com, is the Internet domain name for the main web server at Be. You can extend the URL to go to specific web pages. For example, to go to the product section of the Be web site, you would use the URL http://www.be.com/products/.
There are also URLs for Internet file servers. The URL for Be's public file server is ftp://ftp.be.com, where ftp:// stands for the file transfer protocol, and ftp.be.com is the Internet domain name for Be's file server.
There are URLs for mail, news, and many other web services. There is even a URL for accessing files on your local hard disk--file:///boot/beos/documentation/index.html accesses documentation installed on your hard disk with the BeOS.
The Internet includes the World Wide Web, a global network of servers. This section discusses accessing web pages with the NetPositive application, and setting up a basic personal web server with the PoorMan web server application.
NetPositive is a web client application, also called a browser. It lets you access any web page on the Internet, view its contents, and link to pages connected to it. To start NetPositive, double-click on its icon (/boot/apps/NetPositive). The default browser window appears.
The NetPositive application browser window displays the contents of the web page you're currently viewing, and all the basic controls needed to navigate the web.
The browser window has a menu bar at the top. Below that is the URL field, and to its right is a set of navigation buttons. The rest of the window shows the contents of the current web page.
Notice that the horizontal scroll bar in the lower-left portion of the window does not extend across the entire bottom of the window. The gray space to the left is the status bar. As you move the cursor over the web page, the status bar shows the location of that hyperlink (where you would go if you clicked on the hyperlink). The status bar also contains progress messages about the download of a page.
To go to another web page, click on a hyperlink, or type the URL for the page into the URL location field beneath the menu bar. If you type www.news.com and press Enter, you'll get a page that looks something like this:
This is a page from c|net, which provides computer-related news and services. You can navigate around this site to become familiar with browsing web pages in NetPositive.
|You don't always have to type the entire URL; if you leave http:// off, NetPositive assumes that the URL represents a web page and adds it automatically.|
The navigation buttons to the right of the URL field allow you to quickly flip through web pages you've visited in the current NetPositive session.
|The Back button takes you to the page before the current page. Pressing it repeatedly moves back multiple pages:|
|The Forward button takes you forward one page|
|Stop stops the download of the current page. The text and graphics already downloaded remain in the window.|
|Reload tells NetPositive to retrieve the current page from the server again. You can use this to update the contents of a page, if it changes rapidly, or to resume a download if you've stopped it.|
You can also access Internet file servers (FTP servers) from NetPositive. To do this, type the file server's URL into the URL field and press Enter. For example, Be's public file server is located at ftp.be.com. If you type ftp://ftp.be.com/pub/contrib/network/, you see the contents of the folder /pub/contrib/network:
To download a file from this page (or any web page) click on the hyperlink. The file begins to download and a new window appears, showing the status of the transfer:
The status window disappears after the file is transferred to your BeOS system. To cancel the download, close the status window. Meanwhile, you can click on another hyperlink or open another web page--downloading continues unless you close the status window. Files retrieved via NetPositive are automatically decompressed and unarchived.
The menus across the top of the browser window give you access to the full functionality and options of NetPositive. Here's a description of each menu and the items it contains:
|New||Opens a new browser window.|
|Open Location...||Opens a window into which you can type a URL. The page is displayed in the topmost browser window.|
|Open File...||Brings up a file panel, allowing you to choose a text, graphic, or HTML page from a hard disk, CD or other local volume.|
|Save||Allows you to save a page to disk in HTML format.|
|Print...||Prints the currently displayed page.|
|Show HTML...||Brings up a window that displays a page's raw HTML code.|
|Close||Closes the window.|
|Cut||Copies selected text to the clipboard, and removes it. This command works only within the URL field or Open Location... window.|
|Copy||Copies selected text to the clipboard.|
|Paste||Pastes selected text into the URL field or the Open Location... window.|
|Clear||Removes selected text from the URL field or the Open Location... window.|
|Select All||Selects all the text in the URL field or in the web page.|
|Find...||Brings up the Find... window, allowing you to search the current web page for a specific word or phrase.|
|Find Again...||Repeats the last Find... with the same word or phrase starting at the last location at which the text was found.|
When you open NetPositive for the first time, the Bookmarks menu contains only one item: Add to Bookmarks. Choosing this adds the current web page to the bookmark list, and you can return to the page at any time by selecting it from this menu.
|Preferences...||Lets you set your default home page and configure NetPositive to use proxy servers (see "Setting Your Default Home Page" and "Using NetPositive With Proxy Servers" below). Preferences also let you choose default fonts for document encodings.|
|Document Encoding||Lets you tell NetPositive what type of document encoding to use. (See "Document Encoding" below).|
There are two context menus in the content area of the web page that help with navigation and access to common commands. To see these menus press the second mouse button. These menus are helpful when you're using a web page is as a replicant (see "NetPositive as a Replicant--Live Desktop Pages--" below).
If you hold the mouse button down over a part of the web page that does not contain a hyperlink, you see a menu with the following commands:
|Back||Takes you back to the previous page.|
|Forward||Takes you forward one page.|
|Add To Bookmarks||Adds the current page to the bookmark list.|
|Bookmarks||Refers to pages added as bookmarks; selecting a bookmark takes you to that page.|
If you hold down any mouse button over a part of the web page that does contain a hyperlink, you see a menu with the following commands:
|Open This Link||Opens the hyperlinked page.|
|New Window with...||Opens the hyperlinked page, and places the contents into a new window (rather than replacing the contents of the current window).|
|Add Link To|
|Bookmarks||Adds the hyperlinked page to the bookmark list.|
|Save Link As...||Opens the hyperlink and saves the contents to disk (rather than display it in a window).|
|Copy Link...||Copies the URL of the hyperlink to the clipboard.|
|Bookmarks||Refers to pages added as bookmarks; selecting a bookmark takes you to that page.|
When you open NetPositive for the first time, you see a default web page that is displayed whenever you start, and when you open a new browser window.
You can change the default home page by selecting Preferences... from the Options menu:
Set a default home page by typing its full URL, including http://, in the text field at the top of the window. The page displays automatically the next time you start NetPositive.
|If you use a modem to connect to the Internet via PPP, you may want to leave the default home page (netpositive:Startup.html) or else point to an HTML file on disk. If you use a remote web page, when you start up NetPositive, your BeOS system attempts to connect via PPP to download the home page. You might not want this to happen each time you open NetPositive.
|If you drop an HTML, text, or graphics file onto NetPositive from the desktop, NetPositive assumes you want to view the contents of that file and so displays it, rather than the home page.|
NetPositive is a replicant-enabled application. You can move web pages and place them within other applications, documents, and on your desktop. Placing a NetPositive page on the desktop makes the page constantly available, and it automatically downloads when you start up your BeOS system.
|For more information on replicants, and on showing and hiding replicants, see the chapter "Learning Be Application Basics."|
To place a NetPositive page onto the desktop (or into any replicant-enabled document), choose Show Replicants from the Deskbar's Be menu. When you do this, a replicant dragger icon appears in the lower-left corner of the NetPositive browser window.
To place the current web page on the desktop, press the mouse button while over the dragger icon, and drag it onto an empty place on the desktop. Once you let go, the web page appears on the desktop and starts to fill with the current page information.
When you close NetPositive the desktop web page remains active. You can navigate web pages using the NetPositive context menus. You can use the dragger icon to move the replicant around the desktop, and the resize box to resize the replicant. You can have as many web page replicants on the desktop as you want.
|A web page replicant does not have a URL text field, so you can't type a URL. However, all your bookmarks are available via the context menus, and you can drag text, image, and HTML files from disk onto the replicant to show their contents.
|If you have a web page replicant on the desktop, the page downloads automatically. when you start up your system. This is fine if you're directly connected to the desktop, but if you connect over a modem it means that a PPP Internet connection starts as soon as your BeOS machine starts. Keep this in mind when placing web page replicants on the desktop.|
As you navigate the web, you'll see that often you are connecting to servers in other countries, which may use different document encodings to display web pages. A document encoding is made up of a region (such as western, Japanese, or Unicode) and an encoding type.
NetPositive lets you specify the default font for each region. This is useful if you switch between web pages created in, say, English and Japanese. You can do this using the Preferences... window, found in the Options menu:
Fonts lets you choose an encoding region and select a display font for NetPositive.
|To view Japanese web pages, or pages created for any multibyte character language, you need to install a font that contains the language's characters. You can find out how to install fonts in "Adding Fonts" in the chapter "Customizing the BeOS ."|
The Options menu also lets you switch encodings for a page on the fly. When you select a different encoding, the window's content area is redrawn to reflect the change. This permits easy viewing of pages that may assume a different default encoding than your normal settings.
If you connect to the Internet via a network at work or school, you may have a proxy server for World Wide Web use or Internet file server (FTP) access. Proxy servers act as a security device, filtering the type of information that comes into a network and flows back out onto the Internet. If you've tried to reach a web server outside your organization and gotten no response, it's possible that your network administrator has set up a proxy server.
NetPositive works with proxy servers. To configure the application for this, open the Preferences window from the Options menu. At the bottom of the window, are two text fields, HTTP and FTP. Put the Internet host name (i.e., proxy.mycompany.com) or IP address for your company's proxy servers into these fields. Close the Preferences window, and NetPositive begins using the proxy servers for web and file server access.
The BeOS system comes with the PoorMan's web server application, which lets you publish your own web pages. PoorMan is designed to serve up HTML-based web pages, graphics, and other web-based information with minimal set up and hassle. It is ideal for small, personal servers and for getting started at prototyping web sites.
To set up your BeOS system as a web server, open the PoorMan application (/boot/apps/PoorMan). This window appears:
The top portion of the PoorMan window has three information fields:
You can run the server with the default configuration, but it's preferable to configure a few additional settings. If you keep /home as the default directory, a dialog tells you it's done and you need to create a file name /boot/home/public_html/index.html in that directory. This is the file that comes up when you access the site.
|If you're using PoorMan for the first time, or the directory folder you set is missing, when you start the application you'll see a dialog that asks if you want to select the default directory (the /boot directory), set a new directory, or quit.|
To prevent outside access to other folders on your system, it's a good idea to set a directory folder on your hard disk--other than the default /boot directory--to use as the root directory of your web server. Place all your web pages and web graphics into this designated folder.
Choose Set Web Directory... from the Settings menu. In the Select Directory file selection window that appears, choose a folder to set the directory to, or use the New Folder command in the File menu to create a new folder. This returns you to the PoorMan window, where your selected folder appears in the Directory: information field.
Unless you clicked off Run Server, PoorMan will still be running after you set the directory.
The scrolling portion of the PoorMan window is called the console. This is where the application displays information about who's accessed what part of your website, and when, in the form of time and date, IP address from which accessed, and specific file(s) accessed. If you're not interested in knowing this, click between the cross lines in the lower-right corner of the window and drag up to close the console, or use the zoom box.
Two commands in the File menu, Save Console as and Save Console Selection as, let you save all or part of the information in the console to a file you designate.
Several additional commands in the Settings menu pertain to logging console information:
If Log to Console is turned off, but Log to File is turned on, information is logged to a file you choose in Set Log File.
The first time you run PoorMan, if Log to File is on and no log file is set, the file selection window appears automatically so you can set a log file.
That's it--you've finished configuring the PoorMan web server. You can press the Start button to restart the web server. PoorMan keep counts of the number of times other people access your web pages, and shows this number in the Hits: information field. At any time you can reset this counter, or stop the web server.
|PoorMan must be running for the web server to be active. When you close the PoorMan window or quit the application, web serving is disabled. You can hide the PoorMan window by double-clicking on its title bar, or by using the DeskBar to Hide All.|
|You can't use an Internet domain name (i.e., mysystem.company.com) to access your BeOS web server unless your network administrator has configured your network's DNS server hardware to recognize the name as a substitute for your Internet IP address. Use the IP Address to access your system, and give this information to others wishing to access your system.|
Your BeOS system can access file servers anywhere on the Internet, and can act as an Internet file server itself, so you can share files and exchange information. The BeOS uses the standard Internet protocol--the File Transfer Protocol, (FTP). The process of file transfer is often called FTPing files.
This section discusses how to access file servers on the Internet, and transfer files to and from your BeOS system and other systems on the Internet. You can do this with either the BeOS text-based command line tools, or a graphical FTP client application. You'll also learn how to set up your BeOS system as an Internet file server.
There are two ways to access an Internet file server from your BeOS System, either with the command line shell built into the BeOS, or with one of the graphical FTP client applications available for the BeOS.
The examples below show how to access Be's public Internet file server, ftp.be.com, and transfer a file called Ktfp251_PR.tgz to your system. Kftp is a graphical FTP application, and is a useful tool. It is stored on the Be file server in compressed format, discussed later in this chapter. The URL to this file is ftp://ftp.be.com/pub/contrib/network/Kftp251_PR.tgz.
You can navigate Internet file servers graphically via the World Wide Web and NetPositive, discussed in this chapter in "Using World Wide Web Services." You can also use a graphical FTP application. One such application is Kftp, by Laurent Pontier. You can find it, along with other freeware, shareware, and commercial software, at http://www.be.com/beware/.
You can set up your BeOS as an Internet file server, capable of transferring and sharing files from any location on the Internet, and with any operating system. To do this, open the Network preferences window (file:///boot/preferences/Network):
To turn on your BeOS system's Internet file server capabilities, click the Enable FTP Server check box in the Network Services section of the window. Below this checkbox is a field titled User Name. If you enter a name in this field, BeOS requires the name to be typed in to access your file server.
The Password button lets you require a password for access to your file server. Pressing this button brings up a new window:
To enable the password requirement, type a new password into both fields (it must be identical in both fields to be accepted). You won't see the password as you type it--the characters are replaced by "*".
Once you complete these steps, press the Save button and restart networking. Your BeOS system will now accept file server requests from other systems on the Internet. To access your system, you or another user should type your system's Internet IP Address (example: 192.168.0.10) as the server name, and then your user name and password.
|For an example of accessing a BeOS file server from the Mac OS, see "Appendix A: Using the BeOS Command Line Shell."|
Electronic mail is the Internet service used most. With e-mail you can send messages anywhere, along with graphics and entire packages of files.
The BeOS has built-in Internet mail services. The application that does most of the work is BeMail (file://boot/apps/BeMail) and its companion, the BeMail Server (also known as the mail daemon). This section shows how to configure the BeOS for sending and receiving mail, and describes the features of the BeMail application.
To set up your BeOS to send and receive e-mail, you need to open the Mail preferences window (file://boot/preferences/E-mail). When you double-click on the E-mail preferences icon, this window appears:
The information you enter in this window tells the BeOS where to find your mail server on the network, your name and password, and other mail-related options.
|POP User Name||POP stands for Post Office Protocol. Your POP user name is usually the first part of your e-mail address (i.e., user in firstname.lastname@example.org).|
|Password||Your network administrator should provide your password. If you do not enter a password, you're asked for one whenever a mail connection is made.|
|POP Host and SMTP Host||Internet domain names or IP addresses to the servers that handle your mail. The POP Host takes care of incoming mail; the SMTP Host (Simple Mail Transfer Protocol) of outgoing mail. If POP and SMTP are left blank, those services are disabled; if you just want to send mail, set the SMTP host and leave POP blank. In most cases, the POP Host and SMTP Host are the same server, but your network administrator may give you different names for each. Also, in most cases, the host name is the last part of your e-mail address (i.e.,. company.com in email@example.com).|
|User Settings||The Real Name field lets you stamp all outgoing mail with your real name (rather than just the e-mail address). The Reply To field lets you specify to which e-mail address responses to your outgoing messages should be sent.|
|Mail Schedule||These menus let you set how often the BeOS should automatically check for mail. You can select a repeating connection, or connections based on day and time. If you connect to the Internet by PPP, checking mail automatically starts an Internet connection (which may require a phone call).|
|Mail Notification||Show Status Window places a permanent window on your desktop that shows the status of your messages (see "Mail Status Window" below). You can also instruct the BeOS to sound a system beep when new messages arrive.|
|Autolaunch mail_daemon||Automatically starts mail services when you start the BeOS. You should generally always have this turned on.|
Once you finish configuring mail preferences, press the Save button to save the settings to disk. Press the Check Now button to check for new messages immediately.
If you set the Show Status window in mail preferences to "on," a new window appears on your desktop. After the BeOS checks for new messages, the window looks like this:
The Mail Status window shows how many new and unread messages you have. If a mail download is in progress, it displays the status of that download as well. If you check Log the window expands to show you the status of mail access.
New messages are automatically routed to a mail/in folder created in your home folder (file://boot/home/mail/in/). When you open the folder, you'll see this window:
This is a BeOS Tracker window, just like the windows you use to manage other files within the BeOS. If you pull down the Attributes menu, however, you'll notice that a new set of attributes, E-mail, lets you display message-related information in the Tracker. This is a key benefit of the BeOS's attribute-based file system, which allows you to organize information any way you want.
In the window above, incoming mail is organized by status, sender's name, subject, and when the message was received, and sorted on the time received, from most recent to the oldest.
When you receive a message, you can double-click on its icon to display it. Double- clicking opens the BeMail app (file:///root/apps/BeMail) and creates a new window:
At a glance, you can see who the message is from, its subject, and date, and can scroll through its contents. If this message had other files attached to it (see "Sending Mail" below), you'd also see a list of attachments. Since this is an incoming message, you can't edit the text in the window, although you can select and copy it. In general, it's easier to reply or forward a message using the menus at the top of the window:
|New Message||Creates a new message window.|
|Reply To Sender||Creates a new message, automatically placing the sender's e-mail address in the To: field.|
|Reply To All||Creates a new message, automatically placing all recipients in the To: field.|
|Forward||Copies the message into a new message, so you can forward the contents to another e-mail address. Also lets you add your own comments to the message.|
|Resend||Copies the message into a new message, so you can forward the contents to another e-mail address. Unlike Forward, the message retains the original From: address. This is often called redirect.|
|Show Header,||Let you see the raw text of the Internet message, with the routing and other technical information.|
|Page Setup, Print||Options for printing the message.|
|Move To Trash||Moves the message to the trash. You can reclaim it by opening the trash and moving it to another folder.|
|Close||Closes the window, and provides a number of options for moving the message.|
The Edit menu has the standard cut, copy, paste, clear, and select all items you'd expect.
To type a new message, double-click on the BeMail app (file:///boot/apps/BeMail) or select New Message from the Message menu from within any BeMail window. This brings up a new message window:
In this window, the To:, Cc: and Bcc: fields are popups that are linked to the BeOS People application. Clicking one brings up a list of people you've entered in the People app, from which you can make a selection to fill the field. You can also type directly into the To:, Cc: and Bcc: fields. Then type your subject and message text.
To attach a file to a message, drag the file onto the mail form; an Enclosures section opens with your file in it. You can also choose Add from the Enclosures menu, and pick a file from the file selection dialog.
If you receive mail with an enclosure attached, click and hold on the enclosure line and a pop-up appears that lets you open the enclosure or save it. If you choose Save, a file selection window lets you direct the enclosure to the folder where you want to save it.
|New Message||Opens a new message window.|
|Send Now||Sends the message immediately.|
|Send Later||Sends the message with the next connection.|
|Page Setup, Print||Options for printing the message.|
|Close||Closes the window.|
|Cut, Copy, Paste...||Normal text editing commands.|
|Quote||"Quotes" the selected text by placing a ">" character in front of each line.|
|Remove Quote||Removes the quote character from the selected lines.|
|Add Signature||Adds the selected "signature" text to the bottom of the message (see "BeMail Preferences" below).|
|Add...||Brings up the file selection window, allowing you to attach a file as an enclosure to this message.|
|Remove||Removes the selected enclosure from the message.|
BeMail's preferences menu allows you to configure BeMail to your way of working. To view this menu, click on the right mouse button on any part of a message window. A context menu appears with these options:
|About||Brings up the BeMail about window.|
|New Mail Message||Creates a new message window.|
|Preferences...||Lets you select the font and point size of text in BeMail windows, and to set the expertise level of BeMail which controls if alert and warning messages appear. Preferences also gives you access to the signatures editor, where you can create standard text endings for your messages (which appears in the Add Signature menu of outgoing messages).|
|Quit||Closes all open messages and quits BeMail.|
The BeOS duplicates Internet remote access capability by way of Telnet. From your BeOS system you can remotely access any BeOS or Unix-based system on the Internet. You can also configure your BeOS to accept remote connections, so you have access to your system no matter where you are.
To set up your BeOS for remote Internet access, turn on the BeOS Telnet server using the Network preferences window (file:///boot/preferences/Network):
To enable the Telnet server, check the Enable TELNET Server checkbox. If you haven't already entered a user name and password (for example, to set up a personal file server), do it now. (TELNET and FTP servers use the same user name and password.) Then press the Save button and restart networking. Your remote access server is now active and you can remotely log in from another system on the Internet.
|You can't use an Internet domain name (i.e., mysystem.company.com) to access your BeOS system remotely unless your network administrator has configured your network's Internet DNS server to recognize the name as a substitute for your Internet IP address. So make sure you use the IP address to access your system.|
Telnet is command-line based, accessed through the Terminal window (file:///boot/apps/Terminal). Telnet commands are identical to BeOS commands. This is important--when you're connected remotely to your system, it behaves as if you are typing on the keyboard. All the same commands are available to you--this applies to any BeOS or Unix-based system you connect to remotely over the Internet.
|The BeOS and many Unix systems use a command line interface and command set known as the Bash Shell, or Bourne Again Shell. Many of the commands are documented in web pages included on your BeOS CD. To learn more about the C Shell and text-based commands, visit a bookstore and browse the many (many) books on the subject.|
To access your BeOS system from another computer--or any other system from your BeOS--you need to open a Telnet client application on that system. If you're using another BeOS system to access your own, open the Terminal application and, at the prompt, type:
$ telnet 192.168.0.67
where 192.168.0.67 is replaced by the domain name or IP address of your system or the computer you are trying to reach. When you reach your BeOS system, you'll see this:
$ telnet 192.168.0.67 Trying 192.168.0.67... Connected to 192.168.0.67 Escape character is '^]". 192.168.0.67 login:
Type in your name and password for access to the system, and you'll see something like this:
login: yourname Password: Welcome to the Be shell. $
You are now remotely connected to your BeOS system, and any command you type is sent and executed on your system, rather than the one you are typing from. For example, you can start an application on your system by changing the directory to where the application is located and typing the application name. For more information on the Be command line shell see "Appendix A: Using the BeOS Command Line Shell."
When you finish, type the exit command; you should see something like this:
$ exit logout Connection closed by foreign host.
To close the Terminal window, type exit again.
If you've been browsing the web or looking at file servers, you've probably seen files ready for download with .tar, .gz, .tgz, .zip, .pkg, and other endings appended to their names. These letters mean the file has been archived, compressed, or both, in the process of Internet transmission to make data transmission easier and more efficient.
Archiving combines several files into one. For example, you can archive ten image files into a single file for transmission, so all the servers between you and the destination only deal with this one file. When you receive an archive, you expand it and get the ten files back in their original form. You can do this with entire applications and their documentation, web sites, and folders.
Compression encodes the contents of a file so that the file takes less space to store-- and less time to transmit. Compression can cut the size of a file down to one-third or less of its original size. When the compressed file arrives at the destination, it can be decompressed and returned to its original state.
Archiving reduces the number of files you need to attach to e-mail messages, or upload to a web site or file server. Compressing reduces the size of files so they take less time to transmit--extremely important if you use a modem to connect to the Internet.
The BeOS has several archiving and compression tools. In many cases, your Internet application takes care of these details for you. In other cases, you'll need to archive and compress, or decompress and unarchive, yourself.
For archiving, one common Internet tool is called tar. It is a command line tool, but there are many ways to access it, as discussed in the section "Archive and Compression Tracker Add-Ons" in this chapter.
You use tar most often to unarchive a file that you've downloaded from the Internet. To do this, open the Terminal window and navigate to the desired folder. You can expand a tar archive by typing the command
tar xvf file_name
The xvf in the command instructs the tar tool to expand the file (x), to be verbose and show you the names of the files as they are extracted (v), and to use the file with the following name (f).
To archive a set of files, you also use the tar command
tar cf archive_name file_name
In this case, tar is told to create a new archive (c) using the file name (f) archive_name, and to place the file file_name into the archive. You can also add files to the archive at any time by using a (for append) rather than c.
For compression, the counterpart of tar is another Unix tool known as gzip. gzip compresses a single file; another tool, gunzip uncompresses it. tar and gzip are often used together, first archiving a group of files into a single tar file, and then compressing them using gzip. This creates files that look like file.tar.gz, or file.tgz.
You use gunzip most often to decompress files downloaded from an Internet server. To do this, open the Terminal window and navigate to the desired folder, then type
This uncompresses the file, and puts the contents into a new file without the .gz extension. It also automatically deletes the compressed file to avoid confusion with the uncompressed version.
To compress a file, do the same thing, only using the gzip command:
This command takes the file file_name and compresses it, putting the result into a new file called file_name.gz.
|For a complete list of the commands for tar commands, type "tar --help" in a command line window, and gzip and gunzip, type "gzip --help" or "gunzip --help" . You can also review this information in the BeOS Shell Tools (file:///boot/beos/documentation/Shell_Tools) documentation included on your BeOS CD.|
The combination of gzip and tar has two disadvantages in the BeOS environment. First, it's a two-steps rather than one, and second, tar does not preserve the attributes of BeOS files, additional information attached to BeOS files by many BeOS applications. This doesn't matter when you're transmitting information to Windows-, Mac OS- or Unix-based systems because those systems can't use the attributes (they do use the data portion of the files, which are stored by tar). But if you're transmitting files to BeOS users, you want to preserve the additional information that attributes provide.
The answer is to use zip (and unzip), which archives and compresses, and preserves the attributes found on BeOS files. In fact, zip is a universal archiving and compression tool; it lets BeOS systems find and store the additional file attributes, while allowing other systems to ignore the attributes and read the data portion of the files.
|zip is freeware and can't be shipped with anything that carries a price tag--so it can't be included on the BeOS CD as a standard tool. You can get zip and unzip from the Be public file server (ftp://ftp.be.com) or other public servers that carry BeOS freeware and shareware.|
You use unzip most often to decompress and unarchive files downloaded from an Internet server. To do this, open the Terminal window, navigate to the desired folder, and type
To archive and compress a file, do exactly the same thing, only using the zip command:
zip result_name.zip file_name
This command takes the file file_name and archives and compresses it, putting the result into a new file called result_name.zip (The result file name must have the .zip extension.) You can add files to the .zip archive by repeating the zip command with the same result_name.zip
|For a complete list of the commands for zip and unzip, you can type "zip -help" or ""unzip -help" while in a command line window.|
You can also compress and archive files with Tracker add-ons. These give you access to gzip, tar, and zip directly from the menus in every Tracker window. Select the files and use the menu to choose the command; the rest is done for you.
For example, the Tracker has a built-in add-on called MakeArchive that uses tar. Select the files you want to archive, and press the right mouse button to see the context menu. Select Add-Ons/MakeArchive at the bottom of the menu, and the selected files are placed into a tar archive named archive.tar.
You can also find the add-ons in the File menu located at the top of all Tracker windows. MakeArchive is included with the BeOS. You can find other Tracker Add-Ons on the Be public file server (ftp://ftp.be.com/ or http://www.be.com/) and on other Be-related sites.
Another class of files you may download from the Internet are self-extracting files, also called installers. These files are self-contained--to decompress and unarchive the contents double-click them. More sophisticated installers offer install options, automatically place files into the appropriate folders, and more.
One such installer for the BeOS is Package Builder by StarCode Software (http://www.starcode.com/). Package Builder is the application that software developers use to create packages, often named with the extension .pkg, which you download from the Internet.
Once you download a package file, double-click to open the package and this window appears:
The window gives you information about the contents of the package. Each package can have a number of groups, such as "full install" or "minimal install." Select where you want the software installed on your hard disk, and press the Begin button. The files are extracted and installed automatically.
The Be User's Guide, in lovely HTML, for BeOS Release 3.
Copyright © 1998 Be, Inc. All rights reserved.
Last modified February 19, 1998.