Installing bzip2 in debian
#apt-get install bzip2
Uncompressing a bzip2 File Using bunzip2
To uncompress a bzip2 file, execute the following command:
#bunzip2 filename.txt.bz2 (where filename.txt.bz2 is the name of the file you wish to uncompress)
The result of this operation is a file called filename.txt. By default, bunzip2 will delete the filename.txt.bz2 file.
Compressing a File Using bzip2
To compress a file using bzip2, execute the following command:
#bzip2 filename.txt (where filename.txt is the name of the file you wish to compress)
The result of this operation is a file called filename.txt.bz2. By default, bzip2 will delete the filename.txt file.
Available Options
#bzip2 --help
bzip2, a block-sorting file compressor. Version 1.0.2, 30-Dec-2001.
usage: bzip2 [flags and input files in any order]
-h --help print this message
-d --decompress force decompression
-z --compress force compression
-k --keep keep (don't delete) input files
-f --force overwrite existing output files
-t --test test compressed file integrity
-c --stdout output to standard out
-q --quiet suppress noncritical error messages
-v --verbose be verbose (a 2nd -v gives more)
-L --license display software version & license
-V --version display software version & license
-s --small use less memory (at most 2500k)
-1 .. -9 set block size to 100k .. 900k
--fast alias for -1
--best alias for -9
If invoked as `bzip2′, default action is to compress.
as `bunzip2′, default action is to decompress.
as `bzcat', default action is to decompress to stdout.
If no file names are given, bzip2 compresses or decompresses
from standard input to standard output. You can combine
short flags, so `-v -4′ means the same as -v4 or -4v, &c.
If you want more option you need to check bzip2 man page using the following command
#man bzip2
Create and Extract .gz Files
gzip and gunzip are GNU file compression and decompression utilities. Usually, files that have been compressed by gzip will have a .gz extension. However, sometimes you may see a file that has a .tgz extension. This is a TAR file that has been compressed by gzip. The .tgz extension is a shorthand version for the .tar.gz extension. This type of file must be uncompressed with gunzip before it can be untarred. However, there is a way to use the tar command to uncompress the file and untar it at the same time. For more information, see the tar: Tape Archive Files guide.
Installing gzip in Debian
#apt-get install gzip
Uncompressing a gzip File Using gunzip
To uncompress a gzip file, execute the following command:
#gunzip filename.txt.gz (where filename.txt.gz is the name of the file you wish to uncompress)
The result of this operation is a file called filename.txt. By default, gunzip will delete the filename.txt.gz file.
Compressing a File Using gzip
To compress a file using gzip, execute the following command:
#gzip filename.txt (where filename.txt is the name of the file you wish to compress)
The result of this operation is a file called filename.txt.gz. By default, gzip will delete the filename.txt file.
Available Options
#gzip -h
gzip 1.3.5
(2002-09-30)
usage: gzip [-cdfhlLnNrtvV19] [-S suffix] [file ...]
-c --stdout write on standard output, keep original files unchanged
-d --decompress decompress
-f --force force overwrite of output file and compress links
-h --help give this help
-l --list list compressed file contents
-L --license display software license
-n --no-name do not save or restore the original name and time stamp
-N --name save or restore the original name and time stamp
-q --quiet suppress all warnings
-r --recursive operate recursively on directories
-S .suf --suffix .suf use suffix .suf on compressed files
-t --test test compressed file integrity
-v --verbose verbose mode
-V --version display version number
-1 --fast compress faster
-9 --best compress better
--rsyncable Make rsync-friendly archive
file... files to (de)compress. If none given, use standard input.
If you want more option you need to check gzip man page using the following command
#man gzip
Incoming search terms:
- debian gzip (150)
- bzip file (98)
- extract gz (85)
- extract bzip (81)
- debian extract gz (59)
- ubuntu gz (57)
- extract gz file (47)
- * bz2 (45)
- bzip extract (45)
- debian unzip gz (45)
-
jd
-
http://blog.2blocksaway.com Flosse
-
http://www.spots.ab.ca S. Keeling
-
Anonymous coward
