Sponsored Content
Full Discussion: CURL syntax
Top Forums Shell Programming and Scripting CURL syntax Post 302957071 by sam@sam on Tuesday 6th of October 2015 05:30:41 PM
Old 10-06-2015
CURL syntax

Topic : cmd to check status of url using Curl
I have below 2 lines which r working fine
Code:
/usr/bin/curl -u user:pasword  http://hostname

Code:
/usr/bin/curl -connect-timeout=10  http://hostname

Now I want to use user:pasword and connect-timeout parameter in one line
Code:
/usr/bin/curl -u user:pasword -connect-timeout=10 http://hostname

but when I execute this cmd a file "onnect-timeout=10" is generated..is any thing wrong with syntax, please suggest your inputs

---------- Post updated at 06:30 AM ---------- Previous update was at 04:57 AM ----------

Problem solved parameter connect-timeout was wrongly defined

Last edited by Don Cragun; 10-22-2015 at 03:06 AM.. Reason: Prevent unintended smiley with NOPARSE tags.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

curl

Aren't there any way to download files as below? For example, I want to download all .html files under the root directory of unix.com/ curl -O https://www.unix.com/*.html This won't work, but please tell me the way to do this. Well, the best way is to get the file list of the directory, but i... (6 Replies)
Discussion started by: Euler04
6 Replies

2. AIX

use of curl

Hi guys , need some help I have to transfer a file from my aix box to another server using ftps protocol, how can i achieve this using curl preferably or any other utility. Thanks Sandeep (0 Replies)
Discussion started by: jayawantsandeep
0 Replies

3. Shell Programming and Scripting

use of curl

I have to transfer a file from my aix box to another server using ftps protocol, how can i achieve this using curl preferably or any other utility. Regards Sandeep (0 Replies)
Discussion started by: jayawantsandeep
0 Replies

4. Shell Programming and Scripting

Using curl in commandline

Hi, I am using curl to hit a url using http in solaris 10 using commandline, I want to transfer an attachment(using multipart curl -F) also as a part of the request. If anyone has used kindly help me with the syntax. I am using below command: /usr/local/bin/curl -v... (1 Reply)
Discussion started by: manishmaha
1 Replies

5. UNIX for Advanced & Expert Users

Syntax error /w curl?

Hello all- I'm (hopefully) trying to replace a WS_FTP (Windows program) job with a curl command in a script on UNIX. In short, this process has been in place for some time, and in curl I am getting directory perm issues, which does not seem to be accurate, since this process has been in place... (2 Replies)
Discussion started by: prestonatwork
2 Replies

6. Shell Programming and Scripting

Help with cURL

Hi all; first of all i need to clarify that i am new to apache2 server configuration and for some needs i want to transfer some files using curl to web directory,so please bear with me: following is the command i m running to transfer file to my web directory: curl -T "q"... (4 Replies)
Discussion started by: arien001
4 Replies

7. UNIX for Advanced & Expert Users

Syntax issue in curl for getting a file from http site

Hi All I am using curl in my client environment. We need to pull a file from the libraries site. All the files are having perticular URL which can be used to get the files. Only issue is, when we fire that command , it will take to authentication page 1st. once authentication is succed, it will... (1 Reply)
Discussion started by: prabirkumardhar
1 Replies

8. Shell Programming and Scripting

How to specify a port with curl?

HI Im trying to use curl to send a xml file and im trying to send it over a specific port poes anyone know how to specify a port with curl? the command im using is C:\curl -X POST -d @C:\myfile.xml http://yourAddress.com/XMLInterface.asp (5 Replies)
Discussion started by: Paul Walker
5 Replies

9. Shell Programming and Scripting

Curl -v logs

Hi All, Seeking for your assistance on how to redirect into another files the logs of curl -v i tried this code below but i got 0 logs. curl -v 'http://127.0.0.0.......' >> test.logs Thanks in advance. BR, (2 Replies)
Discussion started by: znesotomayor
2 Replies

10. Shell Programming and Scripting

Curl command

Hi All, I am using below curl commad and getting output data correctly curl -k -u AASSDD:PPOOII -d "output_mode=csv" --data-urlencode search='search source=*/AASSDDFF/PPOOLLKK**/94.0*ASD-RST* "Caused by" OR "Error: LISTENER WILL BE DISABLED" OR java.lang.reflect.InvocationTargetException |... (1 Reply)
Discussion started by: rakeshtomar82
1 Replies
CURLOPT_TFTP_NO_OPTIONS(3)				     curl_easy_setopt options					CURLOPT_TFTP_NO_OPTIONS(3)

NAME
CURLOPT_TFTP_NO_OPTIONS - Do not send TFTP options requests. SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TFTP_NO_OPTIONS, long onoff); DESCRIPTION
Set onoff to 1L to exclude all TFTP options defined in RFC2347, RFC2348 and RFC2349 from read and write requests (RRQs/WRQs). This option improves interop with some legacy servers that do not acknowledge or properly implement TFTP options. When this option is used CURLOPT_TFTP_BLKSIZE(3) is ignored. DEFAULT
0 PROTOCOLS
TFTP EXAMPLE
size_t write_callback(char *ptr, size_t size, size_t nmemb, void *fp) { return fwrite(ptr, size, nmemb, (FILE *)fp); } CURL *curl = curl_easy_init(); if(curl) { FILE *fp = fopen("foo.bin", "wb"); if(fp) { curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)fp); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback); curl_easy_setopt(curl, CURLOPT_URL, "tftp://example.com/foo.bin"); /* do not send TFTP options requests */ curl_easy_setopt(curl, CURLOPT_TFTP_NO_OPTIONS, 1L); /* Perform the request */ curl_easy_perform(curl); fclose(fp); } curl_easy_cleanup(curl); } AVAILABILITY
Added in 7.48.0 RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. libcurl 7.54.0 April 06, 2016 CURLOPT_TFTP_NO_OPTIONS(3)
All times are GMT -4. The time now is 04:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy