![]() |
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |
To access the contents, click the chapter and section titles.
Complete Idiot's Guide to Linux
Non-RPM PackagesAlthough RPM is great, there are times that the software you are to install wont be in the form of an RPM package. FTP sites like http://sunsite.unc.edu/pub/Linux/ distributions/redhat/contrib/i386/ have tons of programs already packaged in RPM, so you should check there to see if what you need is already available in package format. If it is not, more than likely it will be supplied in a tar or compressed tar file. Working with the tar program for backups is discussed in great detail in Chapter 19, Backups: Safeguarding Your Work. If you need to install a program that doesnt come packaged in RPM format, it is a good idea to install this program into its own directory in the /opt directory. The /opt directory contains mostly third-party software, such as KDE, Netscape, and so on. To make the program visible to the shell, you can create a link for its executable file in the /opt/bin directory. If this directory doesnt exist, you should create it and add it to your PATH environment variable. TarTo extract files from a tar file, follow these steps:
If the maker of the tar file was conscientious enough to place all the files into a directory, you are set. Sometimes the tar file will contain a file called install.sh or some other installation script. Follow instructions as per any readme files (view them with a page such as less). UNIX Compressed Archives: Gzip and CompressMany times tar files will be distributed in compressed format; the typical extensions for compressed files are .gz (gnu zip, or gzip), .Z for the compress program, and .zip for Windows zip compressed archives. If the file has a name like file.tar.gz, that file is a gnu zip compressed tar file. To extract it, youll have to specify the z option to tar: [alberto@digital /tmp]$ tar -xzvf file.tar.gz nsmail/ nsmail/Drafts nsmail/.Drafts.summary nsmail/Trash nsmail/.Trash.summary nsmail/Sent nsmail/.Sent.summary nsmail/Unsent Messages nsmail/.Unsent Messages.summary nsmail/Inbox nsmail/.Inbox.summary Another way of accomplishing the same task is to use pipes using the gzcat program (similar to cat). This program reads information in the compressed archive, decompresses it, and copies it out to the STDOUT. Heres an example of how to use gzcat and tar together: gzcat file.tar.gz | tar -xf - In this example, gzcat pipes the resulting output, a tar file, to the tar program. The tar program looks for data in its STDIN stream because the dash (-) is provided to the f option as an argument. Another way is to decompress the gzip file and then use tar normally. This is more inefficient, and if you are short on disk space, it could cause you to run out of space: gunzip file.tar.gz; tar -xf file.tar The gunzip, gzcat, and the z option to tar can handle files with the .gz or Z extension. If you find a really old archive, you might find it with a .z extension; this is also a gzip compressed file. If the file is not compressed with tar, it just sports a .gz extension. You can use gunzip to decompress it, like this: gunzip file.gz Windows Compressed Archives: ZipThe zip archive format (.zip) originally developed for DOS by Phil Katz is in use by virtually every Windows computer. Linux users can also extract and create this file format using the unzip and zip tools. To unzip a file, just use the unzip command: [alberto@digital /tmp]$ unzip file.zip Archive: file.zip creating: nsmail/ extracting: nsmail/Drafts inflating: nsmail/.Drafts.summary inflating: nsmail/Trash inflating: nsmail/.Trash.summary inflating: nsmail/Sent inflating: nsmail/.Sent.summary extracting: nsmail/Unsent Messages inflating: nsmail/.Unsent Messages.summary inflating: nsmail/Inbox inflating: nsmail/.Inbox.summary
|
![]() |
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement. |