473,387 Members | 1,603 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,387 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 7430
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...

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.