Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > question about tar in Ruby

Reply
Thread Tools

question about tar in Ruby

 
 
Ghelani, Vidhi
Guest
Posts: n/a
 
      02-17-2005
------_=_NextPart_001_01C51518.4E382332
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi,=20

=20

I am trying to package a .tar.gz file using ruby. I have packaged a
tar file using the same ruby code and it works perfectly fine. However,
when I use the same code for a .tar.gz file, it give me an error while
trying to open it . It says that this is not a tar file. I know I need
to change something in my ruby code.=20

There are a few things that I changed i.e. 1) the extension from .tar to
tar.gz

However there is a command at the end of the code which does=20

Tar -cf #.tar.gz file # a folder which contains the
install and license and everything to do with this file.

=20

Now I know that I need to change the above code, since this is not a tar
file. Does anyone know wot to do ??

=20

Any help is appreciated,

Thanx,

Vidhi.

=20

=20


------_=_NextPart_001_01C51518.4E382332--


 
Reply With Quote
 
 
 
 
David N. Springer
Guest
Posts: n/a
 
      02-17-2005
Ghelani, Vidhi wrote:

>Hi,
>
>
>
>I am trying to package a .tar.gz file using ruby. I have packaged a
>.tar file using the same ruby code and it works perfectly fine. However,
>when I use the same code for a .tar.gz file, it give me an error while
>trying to open it . It says that this is not a tar file. I know I need
>to change something in my ruby code.
>
>There are a few things that I changed i.e. 1) the extension from .tar to
>.tar.gz
>
>However there is a command at the end of the code which does
>
> Tar -cf #.tar.gz file # a folder which contains the
>install and license and everything to do with this file.
>
>
>
>Now I know that I need to change the above code, since this is not a tar
>file. Does anyone know wot to do ??
>
>
>
>Any help is appreciated,
>
>Thanx,
>
>Vidhi.
>
>

change tar -cf #.tar.gz file to tar -czf #.tar.gz file

--
David




 
Reply With Quote
 
 
 
 
Austin Ziegler
Guest
Posts: n/a
 
      02-17-2005
On Fri, 18 Feb 2005 02:44:33 +0900, Ghelani, Vidhi
<> wrote:
> I am trying to package a .tar.gz file using ruby. I have packaged a
> .tar file using the same ruby code and it works perfectly fine. However,
> when I use the same code for a .tar.gz file, it give me an error while
> trying to open it . It says that this is not a tar file. I know I need
> to change something in my ruby code.
>
> There are a few things that I changed i.e. 1) the extension from .tar to
> .tar.gz
>
> However there is a command at the end of the code which does
>
> Tar -cf #.tar.gz file # a folder which contains the
> install and license and everything to do with this file.
>
> Now I know that I need to change the above code, since this is not a tar
> file. Does anyone know wot to do ??


Yes. Look at Archive::Tar::Minitar on RubyForge under the Ruwiki project.

-austin
--
Austin Ziegler *
* Alternate:


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Pipelining tar create and tar extract the "Python" way... Ray Van Dolson Python 0 09-25-2009 03:48 PM
Pipelining tar create and tar extract the "Python" way... Ray Van Dolson Python 0 09-23-2009 10:52 PM
os.system('tar -c * | tar -C dst') ##Any other suggestions... list.repository@gmail.com Python 2 04-24-2007 10:29 PM
Version of TAR in tarfile module? TAR 1.14 or 1.15 port to Windows? Claudio Grondi Python 4 08-20-2005 08:01 PM
trouble with Archive::Tar : Can not read compressed format in tar-mode benoit Guyon Perl Misc 2 07-26-2005 01:53 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57