Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

whats the meaning of curl "-s" and "-m"

I have found following in crontab

* * * * * sleep 5; curl -s -m 10 http://url > /dev/null 2>&1
* * * * * sleep 10; curl -s -m 10 http://url > /dev/null 2>&1
* * * * * sleep 15; curl -s -m 10 http://url > /dev/null 2>&1
* * * * * sleep 20; curl -s -m 10 http://url > /dev/null 2>&1
* * * * * sleep 25; curl -s -m 10 http://url > /dev/null 2>&1
* * * * * sleep 30; curl -s -m 10 http://url > /dev/null 2>&1
* * * * * sleep 35; curl -s -m 10 http://url > /dev/null 2>&1
* * * * * sleep 40; curl -s -m 10 http://url > /dev/null 2>&1
* * * * * sleep 45; curl -s -m 10 http://url > /dev/null 2>&1
* * * * * sleep 50; curl -s -m 10 http://url > /dev/null 2>&1
* * * * * sleep 55; curl -s -m 10 http://url > /dev/null 2>&1

so whats the meaning of curl -s -m 10 here ?

like image 945
Er.KT Avatar asked Aug 26 '16 18:08

Er.KT


People also ask

What is s option in curl?

If you don't want Curl to display progress details and errors in output, then you can use the -s option. For example, consider the following case in which Curl throws an error: $ curl https://lti.com. To mute errors like these, use the -s option. $ curl -s [url] For example: $ curl -s https://lti.com.

What is curl SS?

From the curl manpage we can see that -s means "silent mode": -s, --silent. Silent or quiet mode. Don't show progress meter or error messages. Makes Curl mute.

What does curl stand for?

cURL, which stands for client URL, is a command line tool that developers use to transfer data to and from a server. At the most fundamental, cURL lets you talk to a server by specifying the location (in the form of a URL) and the data you want to send.

What is curl command used for?

curl is a command-line tool to transfer data to or from a server, using any of the supported protocols (HTTP, FTP, IMAP, POP3, SCP, SFTP, SMTP, TFTP, TELNET, LDAP, or FILE). curl is powered by Libcurl.


1 Answers

from man curl

--snip--

-m, --max-time <seconds>
              Maximum time in seconds that you allow the whole operation to take.  This is useful for preventing your batch jobs from hanging for hours due to  slow  networks
              or  links  going down.  Since 7.32.0, this option accepts decimal values, but the actual timeout will decrease in accuracy as the specified timeout increases in
              decimal precision.  See also the --connect-timeout option.

              If this option is used several times, the last one will be used.

--snip--

-s, --silent
              Silent  or  quiet mode. Don't show progress meter or error messages.  Makes Curl mute. It will still output the data you ask for, potentially even to the termi-
              nal/stdout unless you redirect it.
like image 190
Doon Avatar answered Sep 25 '22 02:09

Doon