Appendix B: Miscellaneous
Appendix B: Miscellaneous
Taking a Screen Shot
There are two ways to take a screen shot in the BeOS: Press the Print Screen key or Alt+Shift+3. The screen shot appears in the /boot/home folder on your boot disk. All screen shots are in targa format. You can open the screen shot by double-clicking the file or by dragging it onto the ShowImage application.
Compressing and Archiving Files
Files with .tar, .gz, .tgz, .zip, .pkg, and other endings appended to their names have been archived and/or compressed for more efficient data transmission over the Internet.
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.
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 - tar Files
Archiving files is easy: Highlight the files you want to archive, select File > Add-ons > MakeArchive (or Add-ons > MakeArchive from the files' context menu) and you're done. You'll see an icon of a tied package labelled "archive.tar."
You can send a tar archive as an e-mail enclosure or through any type of ftp application. If the receiving end is the BeOS, double-clicking on the package icon brings up the Expand-O-Matic application, where you can set a destination folder for the file and expand it. Note that when transferring to a non-BeOS operating system, the transferred files lose their BeOS attributes. See "14365: head2: Archiving and Compressing - zip Files" below for a more complete explanation.
Compressing - gzip Files
You can compress files with a Unix tool called gzip. This compresses a single file and another tool, gunzip uncompresses it. tar and gzip can be used together by first putting a group of files into a tar archive, and then compressing them using gzip. The resulting file ends in .tar.gz, or file.tgz.
To compress a file, in a Terminal window, go to the folder where your file is located, then type:
gzip file_name
This command takes the file file_name and compresses it, putting the result into a new file called file_name.gz.
To decompress a file (for example, one you've download from and Internet server), use gunzip. In the Terminal window go to the folder where your file is, then type:
gunzip file_name.gz
This decompresses 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 decompressed version.
![]() |
NOTE: 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. |
Archiving and Compressing - zip Files
There are two disadvantages to the combination of gzip and tar in the BeOS environment. First, it's a two-step process 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 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.
![]() |
NOTE: 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 from the Be public file server (ftp://ftp.be.com) or other public servers that carry BeOS freeware and shareware; unzip is on the BeOS Release 4 CD. |
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
unzip file_name.zip
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.
![]() |
NOTE: 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. |
The Be User's Guide, in lovely HTML, for BeOS Release 4.
Copyright © 1998 Be, Inc. All rights reserved.
Last modified November 10, 1998.
