Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Both worked properly without -j or -z options !
When i search the net, I saw that every document writer is bent on specifying the -j and -z options with the respective files !
does it improve the quality or performance coz. i didnt see any one doing a tar without these options ??
Last edited by Aquarius_Girl; 12-24-2009 at 10:38 PM.
It must automatically detect the .bz2 of .gz extension, or maybe bz2 or gz's magic number. That's actually very convenient for me because I often get confused with those 'j' and 'z' flags.
And there is no way that performance is reduced, because a 'gz' file and a 'tar' file are completely unrelated formats.
Unlike the Windows .zip format leads you to think, compression and archiving are completely separate tasks.
It's just that bzip2 and gzip are only compression formats. That is, they just compress a single stream of bytes, and they do not have the functionality to store information about a directory tree in there.
tar is just an archiving format. It's only purpose is to turn a directory tree into a single file/stream of bytes, that can later be decoded back into a directory tree. It is not a compression algorithm.
You can actually sometimes see bzip2 or gzip being used without tar to compress a single file.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,514
Rep:
The ' tar ' flags changed five years ago ...
From /usr/doc/tar-1.15.1/NEWS , slack 10.2
Quote:
version 1.15 - Sergey Poznyakoff, 2004-12-20
* Compressed archives are recognised automatically, it is no longer
necessary to specify -Z, -z, or -j options to read them. Thus, you can
now run `tar tf archive.tar.gz'.
So now you can just do : 'tar xvf <archive>' with tar.gz an tar.bz2 .
I looked at your src2pkg links. It seems pretty interesting.
Sadly, I'm an *-buntu guy and not slackware. I might fetch your sources and see how much hackery is needed to create a DEB file ... no where is that box of round tuits?
Funny that this gz/bz2 auto-detecting functionality doesn't seem to be mentioned in my man page for tar, even though my version of tar does have the functionality.
Thanks to all of u for throwing light on the subject !
Quote:
Originally Posted by knudfl
The ' tar ' flags changed five years ago ...
From /usr/doc/tar-1.15.1/NEWS , slack 10.2
Quote:
version 1.15 - Sergey Poznyakoff, 2004-12-20
* Compressed archives are recognised automatically, it is no longer
necessary to specify -Z, -z, or -j options to read them. Thus, you can
now run `tar tf archive.tar.gz'.
So now you can just do : 'tar xvf <archive>' with tar.gz an tar.bz2 .
No more jxvf or zxvf is required . !
.....
I tried to uncompress the bz2 and gz files without -j, -z options on openSuse 10.3, It didn't work, openSuse 10.3 was not released 5 years back but much later, it is surprising why tar doesn't work without these options on it !!
Last edited by Aquarius_Girl; 12-24-2009 at 10:41 PM.
MTK358, tar is a GNU program so it is documented with an info page. Any man-page you have for tar is leftover from 10 years ago, or added by your distro. That reminds me to check and make sure mine has been updated with the last changes I made.
SaintDanBert, just since the latest version released last week, src2pkg does support creating debs, rpms and other formats and is available as an installable package in all these format also.
I'd be very glad to hear any feedback from you as it hasn't been tried on most other systems yet. Please email me directly if you have any problems, suggestions or comments: amigo AT ibiblio.org
Gilbert
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,514
Rep:
Post # 9
Quote:
I tried to uncompress the bz2 and gz files without -j, -z options on openSuse 10.3,
It didn't work, openSuse 10.3 was not released 5 years back but much later,
it is surprising why tar doesn't work without these options on it !!
Suse 10.3 has tar-1.17 , no 'j' or 'z' flag needed, unless you changed 'tar'.
Code:
knudfl@linux:~/tmp/2test-tar> tar xvf test-tar+bz2-1.17.tar.bz2
1
2
3
knudfl@linux:~/tmp/2test-tar> tar xvf test-tar+gz-1.17.tar.gz
1
2
3
This test was made on Suse 10.3, I also used it yesterday : tar xvf !
.....
MTK358, tar is a GNU program so it is documented with an info page. Any man-page you have for tar is leftover from 10 years ago, or added by your distro.
What? GNU does not have man pages?
Isn't it easier to type "man tar" than navigate all those menus?
Worst of all, I never, ever saw a Linux tutorial or instructions using info pages! I hardly ever heard of them! How was I supposed to know that info even exists?
'man info'?? No, sorry, it's true. Official GNU programs frown on having man-pages since they have the 'wonderful' in-house tool called 'texinfo'. Don't get me wrong -I am no proponent of it -hate it in fact. And after 10 years using Linux, I... well I still have not been able to figure out how to use info to get any info! The trouble is that some programs have no man-pages at all, so you are stuck with on-line help or convertors. I am building a new system from scratch, and what I am gonna do is use one of the usable replacements, like pinfo or some info2html solution.
Why did they invent info when there already was man?
And still, I've NEVER heard of info before, except just once on some obscure web page I happened to get on accidentally. How is the average user even supposed to know about it?
Years ago ... yes, we had computers back then ... I got a pretty bound, dead tree edition of the "AT&T Unix ..." documentation. I started reading and very little made sense. While shuffling pages I stumbled across text that explained
the books were printed copies of the official man pages
the pages were in alpha order within each section 'man (1)..." then 'man (2) ..." etc.
At that point I noticed that I was reading in the 'G' part of this book for an item titled "Getting Started."
Sometimes you just gotta know ... [lol]
~~~ 0;-Dan
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.