[Cialug] create .tgz on Win32

kendall bailey cialug@cialug.org
Fri, 21 Jan 2005 15:55:48 -0600


It could be that the cygwin tar program is not liking the "c:\"

When using cygwin tools, I'm always in a bash shell and use the 
/cygdrive/c/ method of specifying an absolute path.  I don't think 
running from in a cmd shell would be any different.  Maybe try something 
like this
  
    bash.exe -c "(cd /cygdrive/c/test ; tar cvf - * ) | gzip > 
/cygdrive/c/test.tgz"

Or as someone else pointed out, let tar do the compression for you

    bash.exe -c "(cd /cygdrive/c/test ; tar cvzf /cygdrive/c/test.tgz *)"

I haven't tried this, so ymmv.  Good luck.

Kendall


   

David Champion wrote:

> Will be running as a .bat script scheduled task, as Administrator. My 
> test was when logged in as Administrator.
>
> I typed:
>
> tar -cvf - c:\test\*.* | gzip > test.tgz
>
> It says:
>
> tar: Cannot open-: Permission denied
>
> Maybe the stdin / stdout thing is b0rked in the Win32 version.
>
> -dc
>
> Nathan C. Smith wrote:
>
>> If you are running it in a script (webserver?) on windows, did you 
>> make sure
>> the account it is running under has permissions to the executable and 
>> to the
>> drives it is accessing?
>>
>> -Nate
>>
>> -----Original Message-----
>> From: David Champion [mailto:dave@visionary.com] Sent: Friday, 
>> January 21, 2005 3:21 PM
>> To: cialug@cialug.org
>> Subject: [Cialug] create .tgz on Win32
>>
>>
>>
>> What tools would all y'all use to create a .tgz (gnu tar gzip) on a 
>> Win32 server? Has to be command line capable to call from a script.
>>
>> I tried the tools from gnuwin32.sourceforge.net, and they're getting 
>> errors. I can create a plain tar, and can create a gzip, but piping 
>> the tar thru gzip generates dll errors.
>>
>> I suppose I could do it in 2 steps - create the tar, then gzip it.
>>
>> -dc
>
>
>
> _______________________________________________
> Cialug mailing list
> Cialug@cialug.org
> http://cialug.org/mailman/listinfo/cialug
>