On Sep 16, 2008, at 3:30 AM, Brian Candler wrote:

> Ara Howard wrote:
>> IO.popen 'tar cfz -', 'w+' do |pipe|
>>
>> end
>>
>> and just send files down the pipe
>
> Uh??
>
> "tar cfz -" creates a tarfile called "z" and tries to pack a file  
> called
> "-" in it.
>
> "tar czf - file1 file2 file3" reads the named files from disk and  
> sends
> the *output* to stdout.
>
> If you don't specify any files, then nothing is created:
>
>  $ tar -czf -
>  tar: Cowardly refusing to create an empty archive
>  Try `tar --help' or `tar --usage' for more information.
>
> That's for gnu tar, maybe others work differently. However, as far  
> as I
> know, you can't get tar to read the *content* of files on stdin - and
> even if you could, how would you format them? That is, how would you
> delimit the start and end of each file, and assign a name to each one?
> -- 
> Posted via http://www.ruby-forum.com/.
>



sorry.  i misread the OPs question.  tar can only unpack to stdout,  
not create from stdin.

a @ http://codeforpeople.com/
--
we can deny everything, except that we have the possibility of being  
better. simply reflect on that.
h.h. the 14th dalai lama