cURL is a CLI tool for issuing HTTP GET, POST, & PUT request.

learn more… | top users | synonyms

3
votes
2answers
4k views

trying to install curl with homebrew, getting “incompatible library version” for libcurl.4.dylib

I am on OSX 10.9.5. I would like to use a later version of CURL than what is bundled with OSX, but I do not want to remove the OSX binary just in case, so I wanted to opt to install it via homebrew. ...
1
vote
1answer
14 views

unzip/untar files using Curl in ftp server

In the curl command we can delete,rename and move files from a FTP server using Curl like in the command below: curl -v -u username:pwd ftp://host/FileTodelete -Q "DELE FileTodelete" Can we untar ...
0
votes
0answers
280 views

CURLE_SSL_CACERT_BADFILE cURL error (77)

I have getting the cURL error CURLE_SSL_CACERT_BADFILE on my Nginx webserver. I found a fix where I add my pem link to my curl.ini file. Before I did this I would get the error on curl ...
2
votes
2answers
2k views

Errors while invoking Web service using `Curl` command from Unix terminal

I have been trying to invoke a web service from my script using the Curl command . I got the script from HERE. My Script : #! /bin/sh ...
0
votes
1answer
1k views

Curl Command PUT Method

curl -i -X PUT -H 'Content-Length: 1000' http://dfdc:dfdc@xx.xx.xx.xxx:xx/directory/ Above curl doesn't produce any response at Ubuntu shell prompt.
0
votes
1answer
35 views

Using Named Pipes in Bash created in a C Program

I have a C code that takes a rather large input. At every iteration, it processes a small chunk of it and it should send that processed chunk to S3 using curl. In the end, it will generate a number of ...
0
votes
1answer
45 views

Parse xml returned from curl within a bash script

I've been digging through stackexchange for the past few days and I've found bits and pieces of what I'm trying to accomplish, but I'm unsure how to put it all together... I'm trying to create a ...
3
votes
1answer
103 views

curl outfile variable not working in bash script

Attempting to shorten a bash script that uses curl to fetch multiple API calls takes something like this: curl --user $USER:$PASS https://api.example.com/foo -o 'foo.json' curl --user $USER:$PASS ...
3
votes
2answers
4k views

Use curl to send binary file through POST with content-type multipart/form-data;

A post request is made to: http://www.example.com/example/ and the post data is as follows: ------WebKitFormBoundaryB8NNdk2kNdndnnn Content-Disposition: form-data; name="picture[uploaded_data]"; ...
2
votes
2answers
4k views

Git pull error libcurl.so.3 not found

I have a php script to git pull from my github repository set up in my webservice hook urls like so: <?php echo shell_exec('~/git/usr/bin/git pull 2>&1'); ?> When I open this script ...
0
votes
2answers
4k views

Failed to connect to dl.google.com port 443: Network is unreachable

$ curl -v https://dl.google.com/dl/cloudsdk/release/install_google_cloud_sdk.bash | bash * STATE: INIT => CONNECT handle 0x2001f130; line 1011 (connection #-5000) * Hostname was NOT found in DNS ...
0
votes
3answers
3k views

The best way to add Unix Shell variables to CURL GET request

Let’s say I use curl –X GET command with the following link: “$WEBSITE_URL/ACTION_NAME/ACTION1;id=$ID?Command=TEST&id1=$ID1&id2=$ID2&id3=$ID3” As you can see, there are some $variables ...
2
votes
1answer
204 views

Filtering JSON request with JQ and bash scripting

I'm requesting a JSON from Twitch with: curl --silent -H 'Accept: application/vnd.twitchtv.v3+json' -X GET https://api.twitch.tv/kraken/streams/$1 where $1 is the input I send for my function. Now ...
0
votes
2answers
2k views

download multiple files from sourceforge

Is there any way to download / mirror a folder structure with many files from sourceforge using wget/curl/similar tool? I've seen some examples using rsync or scp but I think that works only for SF ...
1
vote
2answers
36 views

How to treat remote txt file as stream?

A web service writes its output in a text file. I can fetch that log via: curl -u user:password -k https://log.my-app.com/log.2016-04-04.txt Yet this always only fetches a current "full" file even ...
0
votes
1answer
1k views

Slow DNS resolve from curl/lynx etc

I have a strange issue with DNS resolving: Root of the problem is that I get curl errors: "Error executing HTTP request: name lookup timed out". Tried to ping some sites, all resolved fine (and fast). ...
2
votes
2answers
6k views

How can I specify that curl (via command line) overwrites a file if it already exists?

I'm using curl in this syntax: curl -o myfile.jpg http://mysite.com/myfile.jpg If I run this command twice, I get two files: myfile.jpg myfile-1.jpg How can I tell CURL that I want it to ...
1
vote
1answer
36 views

Cronjob Create File Every Execute

I can create a cron job for every 5 minutes with following codes: */5 * * * * root bash /etc/cron.d/mongo/5min.sh In the /etc/cron.d/mongo/5min.sh file send request with cURL: #!/bin/sh ...
0
votes
2answers
79 views

Curl and Grep to Parsing Content

I need to parse the output of a curl command: curl --user test:test http://192.168.1.1/security/pkm.html | egrep '@company|config.pkm.password' This returns: <input type="text" ...
1
vote
1answer
43 views

bash scripting - wget or curl file with action based on the status 200 or not

I would like to write a script where I try to download a file with wget (or curl if is really not something that can be done with wget) and do 2 actions if the file exists and it's downloaded ...
1
vote
1answer
29 views

curl load IPs from Text file

I have a list of IPs and want to run a specific curl command on each of them. The command is: curl --user test:test http://192.168.1.1/security/pkm.html | egrep '@company|config.pkm.password' ...
1
vote
1answer
38 views

How to pipe html into lynx?

I am testing some ajax call from the console. I like get rid of the meta-information noise that is html markup and just read the content, hence I like to pipe it into a terminal browser, e.g. lynx. ...
0
votes
2answers
1k views

Curl and grep html text

Is there a way to grep html text from a curl request and output grab the value that is between two html tags? More specifically the input value of a form?
1
vote
0answers
44 views

php curl script working in cli but not on crontab [closed]

I have set the following on crontab */1 * * * * /opt/php-5.3/bin/php -f /var/httpd/appliance/appliance/docs/vip_dashboard_script.php >> /tmp/vip.log 2>&1 the contents of my script. ...
1
vote
3answers
135 views

POST json data with cURL from a while loop - bash shell

I have a JSON output from which I need to extract an ID and Iterate through them and send multiple request to API execute REST API with curl. For example: This is how the JSON output looks like: { ...
0
votes
1answer
22 views

Problems with crontab du to curl

I am trying to send the output of a treesize command to my webserver for further processing. This is not going well, I guess mainly because I am very new to Linux/Debian7 :). Hope you can help me. ...
0
votes
1answer
46 views

How to grep response to figure out how many calls got timed out?

I have a curl command which is calling one of our service so if my service timesout, it returns JSON response like below: [{"results":{"response":null},"error":{"errorCode":1001,"message":"Service ...
1
vote
1answer
23 views

How can I give an argument as an external file to curl with url encode?

I try to request query.wikidata.org using curl. The following command line works perfectly : $ curl -G https://query.wikidata.org/bigdata/namespace/wdq/sparql --data-urlencode query='PREFIX wd: ...
0
votes
1answer
15 views

wget TLSv1 behaves the same as TLSv1_2

I used wireshark to compare curl --tlsv1.0 vs --tlsv1.2 The server handshake obediently uses TLSv1.0 for servers that support it (the point is to check to validate they don't): wget url ...
0
votes
0answers
25 views

Curl ebay multi page ebay api xml to a single text file

I am using the curl -K url.txt > output.txt command to transfer the xml output of an ebay api search to a text file. The search I am performing is multi page, but I am unsure how to export ...
-1
votes
1answer
34 views

WGET encountering 403 when trying to access filter - nginx [closed]

I'm trying to download some images from an asset folder of a site, that folder happens to be forbidden. I've tried various suggestions online including a referrer flag for google.com and setting the ...
-2
votes
3answers
62 views

How to view only contents of a website without the source content (HTML)?

I tried using curl but it displays lot of HTML content (Source). I wanted to know whether it is possible to view contents of the webpage - say a table with some information.
3
votes
1answer
58 views

How do I set up ssh port forwarding and run a curl in a single command?

I want to set up port forwarding with ssh like so: ssh user@10.10.10.10 -L 5656:remoteserver:80 -N and then run a curl command: curl http://localhost:5656/my/endpoint/ I can accomplish this just ...
0
votes
2answers
58 views

curl download multiple files with brace syntax

I am trying to download two files by the following syntax: curl -O http://domain/path/to/{file1,file2} The problem is that only the first file is actually saved locally, and the second was simply ...
1
vote
0answers
34 views

How to avoid curl trying IPv6 name resolution

From a docker container when I try to curl 'another container name', curl first tries to resolve the name to IPv6. This causes few seconds delay because the web server is not reachable over ipv6. I ...
1
vote
1answer
130 views

How to fix curl sslv3 alert handshake failure on Gentoo?

I'm trying open a website with cURL like this: $ curl -vH "Accept: application/json" https://www.rocketleaguereplays.com/api/replays/-1/ The output is: * Trying 104.24.114.83... * Connected to ...
6
votes
2answers
7k views

Is there a command line method by which I can check whether a downloaded file is complete or broken?

I'm writing a script that involves downloading and manipulating a file, and I want to ensure that the file is not incomplete (due to e.g. a dropped connection) before I work on it.
1
vote
1answer
49 views

Script a mobile recharge website

I recently come to know that I can curl a website using the bash command curl --user user:pass xyz.com I have an idea for recharging my mobile using the bash script. I want to write a script which ...
0
votes
1answer
95 views

Why is curl failing write to body?

I am trying to install pathogen.vim plugin with following command: mkdir -p ~/.vim/autoload ~/.vim/bundle && \ curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim But it is ...
1
vote
3answers
44 views

Joining two parts together to make a single script

I'm trying to create a script to do the following: extract the magnet link from a lynx bookmark and then use it as part of a curl command. like this: curl ...
1
vote
2answers
49 views

downloading images from webpage with different links

I am trying to download all the images from a webpage. The images are included as follows: <img src="https://alwaysSamePart.com/SomeRandomLinkThatVaries.jpg"> How should I parametrize my wget ...
0
votes
0answers
183 views

How to get curl progress bar in terminal?

I'm using curl to upload files from a bash shell. I know there's the option --progress-bar which is supposed to give an upload progress indicator, but no matter what, I can't get it to show. I do ...
1
vote
2answers
90 views

Copy output of curl to file

I'm running raspbian and using this bash script to take a photo every minute and upload it to my FTP server: #!/bin/bash while [ 1 ]; do DATE=$(date +"%Y-%m-%d_%H_%M_%S") raspistill -q 10 -th none ...
0
votes
0answers
175 views

Curl fails with ntlm proxy

My work uses an NTLM proxy. On my Linux servers and workstations we us cntlm to authenticate. I'm not having any issues with yum,wget, or the web browser, but for some reason curl refuses to work ...
9
votes
3answers
8k views

How do I use curl to download content from sourceforge?

Simply typing http://downloads.sourceforge.net/project/romfs/genromfs/0.5.2/genromfs-0.5.2.tar.gz works fine on a browser, but I'm trying to download from a CLI environment with limited utilities. ...
0
votes
1answer
76 views

cURL: Request to http and https by default

A server is running on 5000 port. I have to write a bash script to cURL that URL and parse the response. Here the problem is server can run on either http or https protocol. That means I have curl ...
0
votes
3answers
79 views

Make curl/cat not scroll down when given long text?

I have made a program where I read the text from a url using curl. The problem is that when given texts that are larger than the terminal window, it automatically scrolls down to the bottom, I want to ...
0
votes
0answers
32 views

Creating a manual delay (30 seconds) on server side (VSFTPD ) - while a bash client sends to it some files using curl

I have created a shell script in ubuntu that connects to a vsftp server using curl and transfer some files. In my testing 3 files and each file will take 0.3 seconds to get transferred (very fast to ...
2
votes
1answer
5k views

Proper escaping of double quotations for curl post data?

I'm trying to test out a server, by sending it JSON data and reading the response. I need to POST data like {"item":"value with spaces"} but when I use curl I find that it sends the backslashes as ...
1
vote
1answer
60 views

Get page in curl as text

Is there any option for curl that saves a page as text? I mean, in the same way a page can be saved in browser as Text Files. At least, Firefox has that option. I need it for a script, I simply ...