From: Alexander Skwar <listen@alexander.skwar.name>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] Re: Re: star
Date: Wed, 26 Sep 2007 10:45:51 +0200 [thread overview]
Message-ID: <3952863.rKYaOu5uJV@kn.gn.rtr.message-center.info> (raw)
In-Reply-To: 20070926093501.655f6ef1@zaphod.digimed.co.uk
Neil Bothwick <neil@digimed.co.uk> wrote:
> On Wed, 26 Sep 2007 10:14:58 +0200, Alexander Skwar wrote:
>
>> Back to tar: Why use "tar -j" in scripts, when "bzip2 | tar"
>> does the same thing? I very much disagree that "tar -j" is
>> the "better" option here;
>
> Either way requires that you first determine the type of compression used
> before you can decide where to pipe tar's output, if at all. Whereas
> something like "tar xf somefile" avoids the need to do" file somefile"
> and parse the output first.
Pardon? "tar xf somefile" doesn't do any compression at all.
I don't get what you mean.
>> in fact, I'd say that "bzip2 | tar"
>> is the better option, as it works on a lot more systems than
>> "tar -j" does. Heck, "tar -j" even does not work on all GNU
>> tar implementations, as very old GNU tars don't have bzip2
>> support at all and -j wasn't always used for bzip2.
>
> If you don't know the details of the platform running your script, you
> should of course stick to POSIX, which tar can do fine.
No, GNU tar is not completely POSIX compliant. The files it creates
don't completely comply to the standard. But that's another story.
> But if your
> script in running in an environment you control, why not make use of more
> efficient methods?
If there are more efficient methods: Maybe. But if the non standard
options aren't more efficient, why use them at all? "tar -j" is a
good example here: Internally, tar invokes the external "bzip2"
command. So with "tar | bzip2" vs. "tar -j", both are equally
efficient.
Alexander Skwar
--
gentoo-user@gentoo.org mailing list
next prev parent reply other threads:[~2007-09-26 9:03 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-22 16:03 [gentoo-user] star Florian Philipp
2007-09-22 17:23 ` Volker Armin Hemmann
2007-09-22 18:14 ` Florian Philipp
2007-09-22 20:00 ` Volker Armin Hemmann
2007-09-24 8:30 ` [gentoo-user] star Alexander Skwar
2007-09-24 17:58 ` Stroller
2007-09-25 6:22 ` [gentoo-user] " Alexander Skwar
2007-09-25 13:24 ` b.n.
2007-09-25 13:34 ` [gentoo-user] " Alexander Skwar
2007-09-25 14:27 ` Neil Bothwick
2007-09-26 7:01 ` [gentoo-user] " Alexander Skwar
2007-09-26 7:18 ` Neil Bothwick
2007-09-26 8:14 ` [gentoo-user] " Alexander Skwar
2007-09-26 8:35 ` Neil Bothwick
2007-09-26 8:45 ` Alexander Skwar [this message]
2007-09-26 8:59 ` [gentoo-user] " Neil Bothwick
2007-09-26 9:49 ` Bo Ørsted Andresen
2007-09-26 10:08 ` [gentoo-user] " Alexander Skwar
2007-09-26 11:07 ` Neil Bothwick
2007-09-26 13:22 ` [gentoo-user] " Volker Armin Hemmann
2007-09-24 8:27 ` [gentoo-user] " Alexander Skwar
2007-09-24 16:38 ` Florian Philipp
2007-09-25 6:27 ` [gentoo-user] " Alexander Skwar
2007-09-25 16:37 ` Florian Philipp
2007-09-25 20:58 ` [gentoo-user] " Michael Schreckenbauer
2007-09-25 22:26 ` b.n.
2007-09-26 9:45 ` Michael Schreckenbauer
2007-09-26 17:44 ` b.n.
2007-09-26 17:46 ` Neil Bothwick
2007-09-24 8:24 ` Alexander Skwar
2007-09-25 20:55 ` [gentoo-user] star Michael Schreckenbauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3952863.rKYaOu5uJV@kn.gn.rtr.message-center.info \
--to=listen@alexander.skwar.name \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox