hi ,
I need a help to extract .tar.bz2 in ubuntu .
Regards,
12 7431 gits 5,390
Expert Mod 4TB
what is the problem? in a console you might use: -
tar xjvf your_file_name.tar.bz2
-
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
@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: -
bunzip2 file.tar.bz2
-
tar -xvf file.tar
-
If its not installed, simply do the following: -
sudo apt-cache search bunzip
-
Search the output for the name of the bunzip2 package and then do: -
sudo apt-get install <package name>
-
Regards,
Jeff
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 ...?
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
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
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
gits 5,390
Expert Mod 4TB
no problem ... it should work :)
kind regards
If i want to tar and zip a directory, then can I use the following command? - 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?
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
@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.
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.
Thanks everybody for the useful information and a very nice duscussion!
Sign in to post your reply or Sign up for a free account.
Similar topics
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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"...
|
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....
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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...
|
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...
|
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,...
|
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: 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...
|
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...
|
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,...
| |