Red Hat ENTERPRISE LINUX 3 - STEP BY STEP GUIDE Manual page 66

Table of Contents

Advertisement

52
Tip
There is much more you can do with File Roller than is explained here. Refer to the File Roller
manual (available by clicking Help => Manual) for more information.
4.3.2. Compressing Files at the Shell Prompt
Compressed files use less disk space and download faster than large, uncompressed files. In Red Hat
Enterprise Linux you can compress files with the compression tools
The
compression tool is recommended because it provides the most compression and is found
bzip2
on most UNIX-like operating systems. The
like operating systems. If you need to transfer files between Linux and other operating system such
as MS Windows, you should use
Windows.
Compression Tool
bzip2
gzip
zip
Table 4-1. Compression Tools
By convention, files compressed with
are given the extension
gzip
Files compressed with
compressed with
bunzip2
4.3.2.1. Bzip2 and Bunzip2
To use
to compress a file, type the following command at a shell prompt:
bzip2
bzip2 filename
The file is compressed and saved as
To expand the compressed file, type the following command:
bunzip2 filename.bz2
The
filename.bz2
You can use
to compress multiple files and directories at the same time by listing them with a
bzip2
space between each one:
bzip2 filename.bz2 file1 file2 file3 /usr/work/school
The above command compresses
/usr/work/school/
.
filename.bz2
because it is more compatible with the compression utilities on
zip
bzip2
, and files compressed with
.gz
are uncompressed with
gzip
, and files compressed with
filename.bz2
compressed file is deleted and replaced with
file1
directory (assuming this directory exists) and places them in a file named
Chapter 4. Managing Files and Directories
compression tool can also be found on most UNIX-
gzip
File
Decompression Tool
Extension
.bz2
bunzip2
.gz
gunzip
.zip
unzip
are given the extension
zip
, files compressed with
gunzip
are uncompressed with
zip
.
,
,
file2
file3
,
, or
bzip2
gzip
zip
, files compressed with
.bz2
are given the extension
bzip2
unzip
.
filename
, and the contents of the
.
.
.zip
are un-
.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise linux 3

Table of Contents