FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 05-06-2008, 12:40 PM
Michael Schmarck
 
Default tar a brand new Gentoo install to a USB drive for safe keeping?

Neil Bothwick <neil@digimed.co.uk> wrote:

> On Mon, 5 May 2008 00:04:44 -0400, Ian Graeme Hilt wrote:
>
>> > tar xvfp SYSTEM.tar.bz2
>>
>> To extract bzip2 files with tar, you need to add the "j" option.
>
> That hasn't been needed for a long time. Tar is able to detect bzip2 and
> gzip compression and handle it automatically.

That's only true for GNU tar. If you're also dealing with other
systems where you might not have GNU tar, you might be "surprised"
to find that "tar xvf file.tgz" doesn't work.

Hence I think, that it is a good idea to keep on using z or j.

Michael

--
gentoo-user@lists.gentoo.org mailing list
 
Old 05-06-2008, 09:33 PM
Neil Bothwick
 
Default tar a brand new Gentoo install to a USB drive for safe keeping?

On Tue, 06 May 2008 14:40:08 +0200, Michael Schmarck wrote:

> > That hasn't been needed for a long time. Tar is able to detect bzip2
> > and gzip compression and handle it automatically.
>
> That's only true for GNU tar. If you're also dealing with other
> systems where you might not have GNU tar, you might be "surprised"
> to find that "tar xvf file.tgz" doesn't work.

However, this thread is specifically about using tar on /Gentoo, which
does use GNU tar.

> Hence I think, that it is a good idea to keep on using z or j.

That really depends on the level of portability your scripts need. Using
z or j is more portable, but also more complex for scripting.


--
Neil Bothwick

Top Oxymorons Number 46: Found missing
 
Old 05-07-2008, 04:01 PM
Steven Lembark
 
Default tar a brand new Gentoo install to a USB drive for safe keeping?

>>>> tar xvfp SYSTEM.tar.bz2
>>> To extract bzip2 files with tar, you need to add the "j" option.
>> That hasn't been needed for a long time. Tar is able to detect bzip2 and
>> gzip compression and handle it automatically.
>
> That's only true for GNU tar. If you're also dealing with other
> systems where you might not have GNU tar, you might be "surprised"
> to find that "tar xvf file.tgz" doesn't work.
>
> Hence I think, that it is a good idea to keep on using z or j.

Not all of them speak any squish factor, leaving:

gzip -dc blah.tar.gz | tar xvf -;

(or bzip/bzip2) as the most portable route.

--
Steven Lembark 85-09 90th St.
Workhorse Computing Woodhaven, NY, 11421
lembark@wrkhors.com +1 888 359 3508
--
gentoo-user@lists.gentoo.org mailing list
 
Old 05-08-2008, 08:00 AM
Michael Schmarck
 
Default tar a brand new Gentoo install to a USB drive for safe keeping?

Neil Bothwick <neil@digimed.co.uk> wrote:

> On Tue, 06 May 2008 14:40:08 +0200, Michael Schmarck wrote:
>
>> > That hasn't been needed for a long time. Tar is able to detect bzip2
>> > and gzip compression and handle it automatically.
>>
>> That's only true for GNU tar. If you're also dealing with other
>> systems where you might not have GNU tar, you might be "surprised"
>> to find that "tar xvf file.tgz" doesn't work.
>
> However, this thread is specifically about using tar on /Gentoo, which
> does use GNU tar.

Well, nonetheless I think that it's a bad idea to get too used to
GNUisms. Especially, if there are so easy "workarounds".

>> Hence I think, that it is a good idea to keep on using z or j.
>
> That really depends on the level of portability your scripts need. Using
> z or j is more portable, but also more complex for scripting.

That's rather a question of how complex the "environment" is, that the
script needs to deal with. If you really want to throw all different
sort of things at your script (like .tar.gz, .tar.Z, .tar.bz2, .tar.lzma),
then yes, the script would get more complex.

Michael

--
gentoo-user@lists.gentoo.org mailing list
 

Thread Tools




All times are GMT. The time now is 07:09 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org