01-18-2005
As you may have guessed, bzip2/bunzip2 can be used for compressing/decompressing bzipped archives. Of course there is bzcat as well.
I usually use one of the two commands to decompress a bzipped archive:
tar xjf something.tar.bz2
bunzip2 something.tar.bz2 | tar xf -
(2nd for non GNU-tar)
Usage is similar to that of gzip. You can search for more examples or read the manpage.
Modern Unix distributions usually have them. If not you may consider to get one from
http://sources.redhat.com/bzip2/.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
hi
could any body tell me how to extract .tar.bz2 files
i tried using tar but in vain.
i found bzip2 in googling but i could not find it on machine unix tru64
please suggest. (1 Reply)
Discussion started by: Raom
1 Replies
2. Shell Programming and Scripting
Hello,
I am using a bash script to archive directories of text files located in ${root}:
tar cf ${root}.tar ${root}*
bzip2 ${root}.tar
I'd like to compare the newly produced archive two.tar.bz2 with the second latest one.tar.bz2.
cmp one.tar.bz2 two.tar.bz2
returns
one.tar.bz2 two.tar.bz2... (2 Replies)
Discussion started by: JCR
2 Replies
3. Shell Programming and Scripting
Hi,
I am trying to unpack and install .tar.bz2 library.
I was told to cd /
and than tar -jxvf /source-of-library-file?...tar.bz2
to get files unpacked and installed into /
Darius
$ pwd
/
$
$ tar -jxvf /tmp/local/root/ncurses-dev-addon.tar.bz2
ncurses-dev-addon/... (3 Replies)
Discussion started by: jack2
3 Replies
4. Shell Programming and Scripting
How to open a .bz2 file in unix. (1 Reply)
Discussion started by: pritish.sas
1 Replies
5. UNIX for Dummies Questions & Answers
I have a file having name smthing.tar.bz2-00
I am trying to unzip it using
tar -xvjf "name"
But I am not able to unzip it.
PLease advise for the issue. (3 Replies)
Discussion started by: nixhead
3 Replies
6. Shell Programming and Scripting
Hi experts,
I have two tar.bz2 file,:
a.tar.bz2 and b.tar.bz2
I want to put a.tar.bz2 in to b.tar.bz2
eg: b.tar.bz2 only have one file named "b.c" contained
I want it contain "b.c and a.tar.bz2"
I don't want to decompress the b.tar.bz2 to achieve this, I try with "cat a.tar.bz2 >>... (1 Reply)
Discussion started by: yanglei_fage
1 Replies
7. UNIX and Linux Applications
Does anyone know a reliable source to download firefox-19.0.2.tar.bz2 from? I would think you be able to download from firefox or mozilla somewhere. I haven't gotten anything useful from my google searches. (2 Replies)
Discussion started by: cokedude
2 Replies
8. HP-UX
Hello,
I need to install GCC but the only archive (GCC-4.9.2) for it I can find is a .bz2 format file. Looking at https://www.unix.com/shell-programming-and-scripting/105282-how-unpack-install-tar-bz2-library.html provided some help, but when I use tar in that way I get the following,... (8 Replies)
Discussion started by: YogaBija
8 Replies
9. Programming
I am using aria2c to download a .tar.bz2 and trying to extract it in the same command. I can download the file but not extract it. I can also manually extract the tar.bz2., but not in the same command. Thank you :).
aria2c -x8 -l log.txt -c -d /xx/xx/xxx --use-head=true --http-user "<user>" ... (8 Replies)
Discussion started by: cmccabe
8 Replies
10. Shell Programming and Scripting
In the bash below each .tar.bz2 (usually 2) are extracted and then the original .tar.bz2 is removed. However, only one (presumably the first extracted) is being removed, however both are extracted. I am not sure why this is? Thank you :).
tar.bz2 folders in /home/cmccabe/Desktop/NGS/API
... (3 Replies)
Discussion started by: cmccabe
3 Replies
LEARN ABOUT PHP
gzdeflate
GZDEFLATE(3) 1 GZDEFLATE(3)
gzdeflate - Deflate a string
SYNOPSIS
string gzdeflate (string $data, [int $level = -1], [int $encoding = ZLIB_ENCODING_RAW])
DESCRIPTION
This function compresses the given string using the DEFLATE data format.
For details on the DEFLATE compression algorithm see the document "DEFLATE Compressed Data Format Specification version 1.3" (RFC 1951).
PARAMETERS
o $data
- The data to deflate.
o $level
- The level of compression. Can be given as 0 for no compression up to 9 for maximum compression. If not given, the default com-
pression level will be the default compression level of the zlib library.
o $encoding
- One of ZLIB_ENCODING_* constants.
RETURN VALUES
The deflated string or FALSE if an error occurred.
EXAMPLES
Example #1
gzdeflate(3) example
<?php
$compressed = gzdeflate('Compress me', 9);
echo $compressed;
?>
CHANGELOG
+--------+-----------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+-----------------------------+
| 5.4.0 | |
| | |
| | Added $encoding parameter. |
| | |
+--------+-----------------------------+
SEE ALSO
gzinflate(3), gzcompress(3), gzuncompress(3), gzencode(3).
PHP Documentation Group GZDEFLATE(3)