PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, May 13, 2022

[FIXED] How to append a file with the existing one using CURL?

 May 13, 2022     append, curl, shell     No comments   

Issue

I've searched all over the web but couldn't find anything useful for this. Using CURL, I want to append content to a file which is already existing and named as test.pls. Can anyone please tell me how can I do it using curl. The commands I've tried are

curl http://192.99.8.170:8098/stream --output test.pls

curl -K --output test.pls http://192.99.8.170:8098/stream

curl -a  --output test.pls http://192.99.8.170:8098/stream

But all of above starts creating files from scratch.They don't keep the initial content of file Can anyone please help me!


Solution

Use the shell's appending output redirection (>>) rather than curl's --output option.

curl http://192.99.8.170:8098/stream >> test.pls


Answered By - Eric
Answer Checked By - David Goodson (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing