Write-Tar/Write-GZip Not working together?

Topics: User Forum
Jul 6, 2011 at 6:10 PM

I'm trying to use the Write-Tar and Write-GZip cmdlets to create a .tar.gz file. The example when you type "help write-tar" suggests the following should work:

  • dir c:\logs\ -rec -inc *.log | write-tar -output logs.tar | write-gzip -level 9

This creates a "logs.tar" file, but does not compress anything, or create a logs.tar.gz file.

If instead I break it up into two steps:

  • "dir c:\logs\ -rec inc *.log | write-tar -output logs.tar
  • get-item logs.tar | write-gzip -level 9

I get a compressed copy of logs.tar called "logs.tar.gz" as I would expect.

Am I missing something?

Developer
Jul 7, 2011 at 4:50 PM
you might need to add -passthru to write-tar

On Wednesday, July 6, 2011, JohnPrice <notifications@codeplex.com> wrote:
> From: JohnPrice
> I'm trying to use the Write-Tar and Write-GZip cmdlets to create a .tar.gz file. The example when you type "help write-tar" suggests the following should work:
>
> dir c:\logs\ -rec -inc *.log | write-tar -output logs.tar | write-gzip -level 9
>
> This creates a "logs.tar" file, but does not compress anything, or create a logs.tar.gz file.
> If instead I break it up into two steps:
>
> "dir c:\logs\ -rec inc *.log | write-tar -output logs.tar
> get-item logs.tar | write-gzip -level 9
> I get a compressed copy of logs.tar called "logs.tar.gz" as I would expect.
> Am I missing something?
> Read the full discussion online <http://pscx.codeplex.com/discussions/264141#post638284>. To add a post to this discussion, reply to this email ([email removed] <[email removed]?subject\x3d[Pscx:264141]>) To start a new discussion for this project, email [email removed] You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings <https://pscx.codeplex.com/subscriptions/thread/project/edit> on codePlex.com. Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

--

---
404 signature missing
Jul 7, 2011 at 6:00 PM

Write-Tar doesn't seem to support a -passthru switch?

I'm using the 2.0 package; I don't know if there have been changes to the source since then. I guess TFS is down on codeplex right now so I just get an error when I try to have a look.

Developer
Jul 7, 2011 at 6:45 PM
You know what John, this might be a problem with the 2.0 build - we had some esoteric issues with pipelining things that have been fixed in the latest source code. Do you know anyone who could build you something from the current source code tree?

On Thu, Jul 7, 2011 at 2:00 PM, johnprice <notifications@codeplex.com> wrote:

From: johnprice

Write-Tar doesn't seem to support a -passthru switch?

I'm using the 2.0 package; I don't know if there have been changes to the source since then. I guess TFS is down on codeplex right now so I just get an error when I try to have a look.

Read the full discussion online.

To add a post to this discussion, reply to this email (Pscx@discussions.codeplex.com)

To start a new discussion for this project, email Pscx@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com




--

---
404 signature missing
Jul 7, 2011 at 6:55 PM

If I can just get source via the "Source Control" tab on codeplex, I think I should be able to build things for myself. As I said, though, it looks like that portion of CodePlex is down for maintenance right now, so I'll have to check back later.

If there's more involved in getting access to the source and building, then I may require some assistance.

Developer
Aug 2, 2011 at 3:15 PM

Did you manage to get a working build?

Aug 2, 2011 at 4:54 PM

Sorry... just after I posted this I got pulled onto something else entirely and so hadn't followed up.

I tried just grabbing the source now, though, but don't have VS2010 on my work machine, so can't open the solution. I get an "unspecified error" trying to open any of the projects; not sure if that's because of the source control bindings or not having 2010.

Anyway, short answer is no, I'm not able to get a working build.

Aug 28, 2013 at 12:53 AM
I can confirm that this is still borged with the 2.1.1 ProductionDec 16, 2012, Stable release, it's actually broken to the point where -OutputPath is entirely ignored by the cmdlet, resulting in an archive per file situation.