473,398 Members | 2,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

need help to extract tar.bz2

16
hi ,
I need a help to extract .tar.bz2 in ubuntu .
Regards,
Aug 29 '09 #1
12 7431
gits
5,390 Expert Mod 4TB
what is the problem? in a console you might use:
Expand|Select|Wrap|Line Numbers
  1. tar xjvf your_file_name.tar.bz2
  2.  
but in ubuntu you should have the typical gnome-archive-manager as gui-tool for that? or do you use another window-manager?

kind regards
Aug 29 '09 #2
numberwhun
3,509 Expert Mod 2GB
@bob2044
Unfortunately, the tar commands 'z' option only unzips .gz extentions. To unzip this, you will have to install bunzip2 if not already installed. You would then do the following:

Expand|Select|Wrap|Line Numbers
  1. bunzip2 file.tar.bz2
  2. tar -xvf file.tar
  3.  
If its not installed, simply do the following:

Expand|Select|Wrap|Line Numbers
  1. sudo apt-cache search bunzip
  2.  
Search the output for the name of the bunzip2 package and then do:

Expand|Select|Wrap|Line Numbers
  1. sudo apt-get install <package name>
  2.  
Regards,

Jeff
Aug 29 '09 #3
gits
5,390 Expert Mod 4TB
the tar man page refers to the j option i showed above to handle the .bz2 files ... or am i wrong? i often used the above shown command to extract such files ...?
Aug 29 '09 #4
micmast
144 100+
To extract tar.bz2 you can use: tar -jxvf (v for viewing the content while extracting)
To extract .tar.gz you can use : tar -zxvf (again the v is for viewing the content)
works for me everytime
Aug 30 '09 #5
gits
5,390 Expert Mod 4TB
yep :) ... and a note: the dash is not really required anymore ... even when i often use it since i always used it too :)

kind regards
Aug 30 '09 #6
numberwhun
3,509 Expert Mod 2GB
Well, I will have to play with the -j option. To tell you the truth, I hadn't explored the man page in a while. If that works, sweet! And thanks for the tip. :)

Regards,

Jeff
Aug 30 '09 #7
gits
5,390 Expert Mod 4TB
no problem ... it should work :)

kind regards
Aug 31 '09 #8
sumittyagi
202 Expert 100+
If i want to tar and zip a directory, then can I use the following command?

Expand|Select|Wrap|Line Numbers
  1. tar -zcvf <directory_name> tar_file_name
and also, will it tar and then zip the tar file, or it will zip all the files in the directory and then tar?
Sep 10 '09 #9
gits
5,390 Expert Mod 4TB
i think the filename should be before the folder to compress (at least i used it on my ubuntu machine that way and the man-page even shows that as example) and to the question - basicly i think it first creates the tar-archive and then uses zip to compress the archive. it is called solid compression ... or similar :) ... you might have a look here for a bit more info ...

kind regards
Sep 15 '09 #10
numberwhun
3,509 Expert Mod 2GB
@gits
You are completely correct gits. The f option is to specify the file name to output to, thus, the name that immediately follows it should be the output file. After that, you can list everything you need to include in the file.
Sep 15 '09 #11
Plater
7,872 Expert 4TB
It will tar then zip.
Roughly: TAR is the "tape archive" format, meaning it lines up all the files sequencialy (no fragmenting) for when backups where done to a tape drive (Think like an ISO file for cds now). The gz and bz2 are compressions applied after the fact.
Sep 18 '09 #12
sumittyagi
202 Expert 100+
Thanks everybody for the useful information and a very nice duscussion!
Sep 20 '09 #13

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Don Crossman | last post by:
Assume a MYSQL table, foo. One column, bar datetime. Two rows: 2004-01-01 08:00:00 2004-02-01 08:00:00 select * from foo where extract(day from bar)=1; 2 rows in set...
3
by: rahman | last post by:
I have few hundred HTML pages. I need to extract portion of each HTML page into a text/database/HTML files format. You can imagine it is very tedious to do one by one. Is there any automatic...
0
by: ward | last post by:
Greetings. Ok, I admit it, I bit off a bit more than I can chew. I need to complete this "Generate Report" page for my employer and I'm a little over my head. I could use some additional...
4
by: Sullivan WxPyQtKinter | last post by:
I do not know if there is any lib specially designed to process the strings in scipt language. for example: I hope to process the string"print a,b,c,d,e "in the form"command argumentlist" and...
0
by: harsha1305 | last post by:
Hi all, I need to create a pointer to array of structure. Definition of structure: typedef struct { char b_name; unsigned long int sig; unsigned long int count; volatile unsigned char...
9
by: Paulers | last post by:
Hello, I have a log file that contains many multi-line messages. What is the best approach to take for extracting data out of each message and populating object properties to be stored in an...
1
by: brahatha | last post by:
I am trying to come up with a Java code where I can read a xml file and extract particular element/attribute. This is the structure of xml I have <RootElement> <colAttempt> <Attempt1 a="1"...
2
by: kenmasters675 | last post by:
I need help with the following code. I am trying to extract two reports at the same time, but I want the viewer to see the report first before exporting it. The reason is in case the report is null....
6
by: zaina | last post by:
hi everybody i am nwebie in this forum but i think it is useful for me and the member are helpful my project is about connecting client with the server to start exchanging messages between...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.