[Cialug] create .tgz on Win32

cialug@cialug.org cialug@cialug.org
Mon, 24 Jan 2005 16:24:53 +0000


I got it working with:

tar cvzf test.tgz .

But, you should be able to specify /cygdrive/c/test/ instead of ".".

According to tar --version, I'm using:
tar (GNU tar) 1.13.25

This is Cygwin's tar, BTW.
--
Tim W.
> After All that I just looked up your source, and no, you can't do it 
> without using two commands, see:
> 
> http://gnuwin32.sourceforge.net/packages/tar.htm
> 
> "Description
> The tar program provides the ability to create tar archives, as well as 
> various other kinds of manipulation. For example, you can use tar on 
> previously created archives to extract files, to store additional 
> files, or to update or list files which were already stored.
> 
>   The Win32 port can only create tar archives, but cannot pipe its 
> output to other programs such as gzip or compress, and will not create 
> tar.gz archives."
> 
> 
> On Jan 21, 2005, at 3:49 PM, Bryan Baker wrote:
> 
> > Actually, just checked it here on some random files (OSX) and what you 
> > want is:
> >
> > tar cvzf test.tgz C:\test\*.*
> >
> > remembering that the first argument after the f needs to be the name 
> > of the file to create.
> > why complicate it w/ piping?
> >
> > On Jan 21, 2005, at 3:43 PM, Bryan Baker wrote:
> >
> >> doesn't the win32 version have the "z" option?
> >> I usually just use tar to do the compression itself on *nix.
> >>
> >> from tar's MAN:
> >>
> >> -z
> >>      --gzip
> >>      --ungzip
> >>      --gunzip                Filter the archive through gzip(1).
> >>      --use-compress-program program
> >>                              Filter the archive through program 
> >> (which must
> >>                              accept -d to mean ``decompress'').
> >> so I'd try:
> >>
> >> tar -cvzf - c:\test\*.* test.tgz
> >>
> > --
> > Bryan Baker
> > Technology Advocate
> > Iowa Legal Aid
> > Suite 230
> > 1111 9th Street
> > Des Moines, Ia 50314-2527
> >
> > (515) 243-2151 (x1635)
> >
> > http://www.iowalegalaid.org
> > bbaker@iowalaw.org
> >
> >
> --
> Bryan Baker
> Technology Advocate
> Iowa Legal Aid
> Suite 230
> 1111 9th Street
> Des Moines, Ia 50314-2527
> 
> (515) 243-2151 (x1635)
> 
> http://www.iowalegalaid.org
> bbaker@iowalaw.org
>