Re: Reg Input to curl from tar command compressed output
Date: Mon, 6 Apr 2020 22:33:43 +0530
Hi ,
Could you kindly suggest for http/https :
tar --create --file=- --directory=/dir1 ./ | gzip -c | curl -T- -d "@-"
http://192.168.20.10/gzipimage.tar.gz
tar --create --file=- --directory=/dir1 ./ | gzip -c | curl -T-
-d,(</dev/stdin)" http://192.168.20.10/gzipimage.tar.gz
Regards,
Murugan
On Mon, Apr 6, 2020 at 1:36 PM murugan balraj <murugan3732_at_gmail.com> wrote:
> Hi Daniel Stenberg ,
>
> Thanks a lot for the suggestion. It worked !!!
>
> Regards ,
> Murugan
>
> On Mon, Apr 6, 2020 at 1:08 PM Daniel Stenberg <daniel_at_haxx.se> wrote:
>
>> On Mon, 6 Apr 2020, murugan balraj via curl-users wrote:
>>
>> > I want to share the output of tar compressed image to curl as an input
>> > using pipe.
>> > Commands i tried to pipe :
>> > 1)tar --create --file=- --directory=/dir1 ./ | gzip > gzipimage.tar.gz
>> > 2)curl -v -T gzipimage.tar-gz tftp://192.168.20.10/
>> >
>> > I have tried the following. But unsuccessful.
>> >
>> > tar --create --file=- --directory=/dir1 ./ | gzip > - | curl -v -d
>> > "@-" -T gzipimage.tar.gz tftp://192.168.20.10/ > gzipimage.tar.gz
>> >
>> > My intention is to avoid creating the intermediate compressed image (
>> > gzipimage.tar.gz ) while uploading the compressed file using curl.
>>
>> Something like this?
>>
>> tar --create --file=- --directory=/dir1 ./ | gzip -c |
>> curl -T- tftp://192.168.20.10/gzipimage.tar.gz
>>
>> The -T option can read the uploaded file from stdin when '-' is used. But
>> when
>> so, it has no file name to append to the URL so you better set the full
>> name
>> in the URL you're uploading to.
>>
>> --
>>
>> / daniel.haxx.se | Commercial curl support up to 24x7 is available!
>> | Private help, bug fixes, support, ports, new features
>> | https://www.wolfssl.com/contact/
>>
>
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-04-06