L11 Compression, System Backup, and Software Installation
Unlock all answers in this set
Unlock answersquestion
_____ is a process in which files are reduced in size by stripping out characters.
answer
Compression
question
A _____ is a standard set of instructions used to compress a file.
answer
compression algorithm
question
The _____ is the amount of compression occurring during compression in relation to the original file size.
answer
compression ratio
question
State the three most common compression utilities.
answer
compress gzip bzip2
question
T/F. The compress utility is one of the oldest compression utilities common to most UNIX and Linux systems. Its compression algorithm, which is called Adaptive Lempel-Ziv coding (LZW), has an average compression ratio of 40 to 50%.
answer
True
question
To compress a file using the compress utility, you can specify the files to compress as arguments to the _____ command. Each file is renamed with a .Z filename extension to indicate that it is compressed.
answer
compress
question
T/F. You can use the zmore and zless commands to view the contents of a compressed file page-by-page.
answer
True
question
The _____ utility uses a Lempel-Ziv compression algorithm (LZ77) that varies slightly from the one used by the compress utility. Typically, this algorithm yields better compression than the one used by compress. The average compression ratio for gzip is 60 to 70%.
answer
GNU zip (gzip)
question
The gzip utility uses the __________________________ filename extension by default and can control the level of compression via a numeric option (based on time needed to compress the file).
answer
...
question
T/F. You can use the zcat and zmore commands to send the contents of a compressed file using the gzip utility to standard output.
answer
True
question
The _____ command is used to decompress the .gz files.
answer
gunzip
question
The _____ command is used to compress files using the Burrows-Wheeler Block Sorting Huffman Coding compression algorithm. It can't compress a directory full of files. The compression ratio is 50% to 75% on average.
answer
bzip2
question
The filename extension given to a compressed file using bzip2 is __________________________.
answer
...
question
T/F. The bzip2 utility can't use zcat and zmore to view files. Instead, the bzcat, bzmore and bzless command must be used.
answer
True
question
The _____ command is used to decompress files compressed via bzip2.
answer
bunzip2
question
The _____ is a process whereby files and directories are copied and stored at an alternative location.
answer
system backup
question
______ are the backup copies of files and directories.
answer
Archives
question
T/F. As a general rule of thumb, you should back up user files from home directories and any important system configuration files such as /etc/passwd.
answer
True
question
There are several backup utilities available. State them.
answer
tar cpio dump/restore Disk-burning software
question
The_____ utility is one of the oldest and most widely used backup utilities. It can create an archive in a file on a filesystem or directly on a device. It accepts options to determine the location of the archive and the action to perform on the archive.
answer
tape archive (tar)
question
To create an archive called /backup.tar that contains the contents of the current directory and view the contents, you can use the commands:
answer
tar -cvf /backup.tar * ls -l /backup.tar
question
T/F. The tar utility does not compress files inside the archive. Therefore, the time needed to transfer the archive across a network is high. To reduce transfer times, you can compress the archive using a compression utility before transmission.
answer
True
question
T/F. Backing up files to a compressed archive on a filesystem is useful when transferring the archived data across a network. However, you can use tar to back up data directly to a device such as a tape.
answer
True
question
The ____ utility is another common backup utility that uses options similar to the tar utility. It has some added features including long filenames and the ability to back up device files. It uses absolute pathnames by default when archiving.
answer
copy in/out (cpio)
question
The _____ utility can be used to back up files and directories to a device or to a file on the filesystem. It only works with files on ext2 and ext3 filesystems.
answer
dump/restore
question
T/F. The /etc/dumpdates is a file used to store information about incremental and full backups.
answer
True
question
A _____ archives all of the data on the filesystem.
answer
full backup
question
An _____ backs up only data that has changed since the last backup of any type.
answer
incremental backup
question
The __________________________ command extracts the archives created with dump.
answer
...
question
T/F. The tar, cpio and dump utilities copy data to a backup medium in a character-by-character or block-by-block format. It is typically used with tape, floppy and hard disk media.
answer
True
question
_____ is used to write files to CD-RW or DVD-RW media. Fedora Core comes with the Brasero Disc Burner program.
answer
Burning software
question
T/F. Software for Linux can consist of binary files and source code.
answer
True
question
_____ are precompiled to run on certain hardware architectures.
answer
Binary files
question
_____ must be compiled on the local architecture before it can be used.
answer
Source Code
question
The _____ provides a standard format for distributing programs as well as a central database to store information about software packages installed on the system. It is used to install, query and remove packages.
answer
Package Manager
question
The Red Hat Package Manager is the most common package manager used by Fedora Core Linux systems today.
answer
...
question
The _____ is the most common package manager used by Debian-based Linux systems today. Ubuntu Linux uses this Package Manager.
answer
Debian Package Manager (DPM)
question
T/F. The procedure for compiling source code into binary programs is standardized today among most Open Source Software (OSS) developers.
answer
True
question
T/F. Because most source code comes in tarball format, you must uncompress and extract the files. This creates a subdirectory under the current directory containing the source code.
answer
True
question
T/F. In addition, this directory typically contains a README file with information about the program and an INSTALL file with instructions for installation.
answer
True
question
T/F. While inside the source code directory, the first step to installation is to run the configure program. This performs a preliminary check for system requirements and creates a list of what to compile inside a file called Makefile in the current directory.
answer
True
question
T/F. Next you can type the make command, which looks for the Makefile file and uses the information in it to compile the source code into binary programs using the appropriate compiler program for the local hardware architecture.
answer
True
question
T/F. After compilation, the binary files the program comprises remain in the source code directory. To copy the files to the appropriate location on the filesystem, such as a directory listed in the PATH variable, you must type make install.
answer
True
question
The packages in RPM format have filenames that indicate the hardware architecture for which the software was compiled and end with the __________________________ extension.
answer
...
question
T/F. To install an RPM package, use -i option with the rpm command.
answer
True
question
After installation, the RPM database is updated to contain information about the installed package and files contained in it. List some useful options to use with the rpm command.
answer
-q option: query the full package name -i option: together with -q used to display full package information -f option: together with -q used to display the package to which a specific file belongs -e option: used to remove a package from the system
question
Most RPM packages are located on Internet servers called __________________________.
answer
...
question
The yum (Yellowdog Update Modular) command is used to search Internet software repositories for RPM packages. It downloads and installs the dependent packages if necessary.
answer
...
question
T/F. KPackageKit is a graphical utility for installing or updating packages.
answer
True
question
The DPM is similar to the RPM. However, it uses the __________________________ extension for its packages.
answer
...
question
The __________________________ command can be used to install DPM packages that have been downloaded locally.
answer
...
question
In addition, the __________________________ command can be used to download and install DPM packages from software repositories on the Internet and is analogous to the yum command for the RPM.
answer
...
question
1. Most source code is available on the Internet in tarball format. True or False?
answer
True
question
2. Which dump level indicates a full backup? a. 0 b. 9 c. 1 d. f
answer
a. 0
question
3. Which filename extension indicates a tarball? a. .tar.gz b. .cpio c. .dump d. .tar
answer
c. .dump
question
4. Files that have been compressed using the compress utility typically have the ______ extension. a. .tar.gz b. .gz c. .Z d. .bz2
answer
c. .Z
question
5. The bzip2 and gzip utilities use similar compression algorithms. True or False?
answer
False
question
6. When compiling source code into a binary program, which command does the compiling using the GNU C Compiler? a. tar b. ./configure c. make d. make install
answer
c. make
question
7. The -9 option to the gzip utility results in a higher compression ratio. True or False?
answer
True
question
8. You have created a full backup and four incremental backups. In which order must you restore these backups? a. 0, 1, 2, 3, 4 b. 0, 4, 3, 2, 1 c. 4, 3, 2, 1, 0 d. 1, 2, 3, 4, 0
answer
a. 0, 1, 2, 3, 4
question
9. Which of the following commands extracts an archive? a. cpio -vocBL /dev/fd0 b. cpio -vicdu -I /dev/fd0 c. cpio -vicdu -O /dev/fd0 d. cpio -vti -I /dev/fd0
answer
b. cpio -vicdu -I /dev/fd0
question
10. The Debian Package Manager (DPM) is the default package manager used by Fedora 13. True or False?
answer
False
question
11. Which of the following commands can be used to list the files contained within an installed RPM package? a. rpm -qa packagename b. rpm -qi packagename c. rpm -ql packagename d. rpm -q packagename
answer
c. rpm -ql packagename
question
12. When compiling source code into a binary program, which command copies compiled binary files to the correct location on the filesystem? a. tar b. ./configure c. make d. make install
answer
d. make install
question
13. To install a new program from RPM software repositories on the Internet, you can use the yum update programname command. True or False?
answer
False
question
14. Which file contains full and incremental backup information for use with the dump/restore utility? a. /etc/dumps b. /etc/dumpdates c. /etc/dumpfile d. /etc/dump.conf
answer
b. /etc/dumpdates
question
16. What is the most common method for obtaining Linux software? a. CD-ROM b. floppy disk c. Internet download d. e-mail
answer
c. Internet download
question
17. Which option to the rpm command can be used to remove a package from the system? a. r b. e c. u d. U
answer
b. e
question
18. Which of the following commands creates an archive? a. tar -cvf /dev/fd0 b. tar -xvf /dev/fd0 c. tar -tvf /dev/fd0 d. tar -zcvf /dev/fd0 *
answer
d. tar -zcvf /dev/fd0 *
question
19. When compiling source code into a binary program, which command performs a system check and creates the Makefile? a. tar b. ./configure c. make d. make install
answer
b. ./configure
question
20. Which of the following commands can be used to list detailed information about a package such as its installation date and license? a. rpm -qa packagename b. rpm -qi packagename c. rpm -ql packagename d. rpm -q packagename
answer
b. rpm -qi packagename