<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to fetch a url with curl or wget silently</title>
	<atom:link href="http://www.mattcutts.com/blog/how-to-fetch-a-url-with-curl-or-wget-silently/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mattcutts.com/blog/how-to-fetch-a-url-with-curl-or-wget-silently/</link>
	<description>neat fun stuff</description>
	<lastBuildDate>Thu, 18 Mar 2010 06:22:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jame</title>
		<link>http://www.mattcutts.com/blog/how-to-fetch-a-url-with-curl-or-wget-silently/#comment-460687</link>
		<dc:creator>Jame</dc:creator>
		<pubDate>Sun, 31 Jan 2010 07:44:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattcutts.com/blog/how-to-fetch-a-url-with-curl-or-wget-silently/#comment-460687</guid>
		<description>Hi , I have a problem with wget command. I want to get the file just only 1 time but the command can &#039;t do that.  

wget  --tries=1 http://xxx.com
It &#039;s mean retry for 1 time 

wget  --tries=0 http://xxx.com
It &#039;s mean retry indefinite times

Could you tell me how can I use wget command without retry?

Thanks</description>
		<content:encoded><![CDATA[<p>Hi , I have a problem with wget command. I want to get the file just only 1 time but the command can &#8216;t do that.  </p>
<p>wget  &#8211;tries=1 <a href="http://xxx.com" rel="nofollow">http://xxx.com</a><br />
It &#8217;s mean retry for 1 time </p>
<p>wget  &#8211;tries=0 <a href="http://xxx.com" rel="nofollow">http://xxx.com</a><br />
It &#8217;s mean retry indefinite times</p>
<p>Could you tell me how can I use wget command without retry?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: name</title>
		<link>http://www.mattcutts.com/blog/how-to-fetch-a-url-with-curl-or-wget-silently/#comment-444755</link>
		<dc:creator>name</dc:creator>
		<pubDate>Sun, 27 Dec 2009 17:56:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattcutts.com/blog/how-to-fetch-a-url-with-curl-or-wget-silently/#comment-444755</guid>
		<description>--output-document=/dev/null</description>
		<content:encoded><![CDATA[<p>&#8211;output-document=/dev/null</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sohbet</title>
		<link>http://www.mattcutts.com/blog/how-to-fetch-a-url-with-curl-or-wget-silently/#comment-436657</link>
		<dc:creator>sohbet</dc:creator>
		<pubDate>Fri, 11 Dec 2009 14:56:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattcutts.com/blog/how-to-fetch-a-url-with-curl-or-wget-silently/#comment-436657</guid>
		<description>thnxxx</description>
		<content:encoded><![CDATA[<p>thnxxx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert</title>
		<link>http://www.mattcutts.com/blog/how-to-fetch-a-url-with-curl-or-wget-silently/#comment-398567</link>
		<dc:creator>Robert</dc:creator>
		<pubDate>Thu, 01 Oct 2009 07:38:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattcutts.com/blog/how-to-fetch-a-url-with-curl-or-wget-silently/#comment-398567</guid>
		<description>@David

To get into a .htpasswd protected folder, use:
--http-user=xxxxx --http-passwd=xxxxx

Cheers,
Robert</description>
		<content:encoded><![CDATA[<p>@David</p>
<p>To get into a .htpasswd protected folder, use:<br />
&#8211;http-user=xxxxx &#8211;http-passwd=xxxxx</p>
<p>Cheers,<br />
Robert</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aneem</title>
		<link>http://www.mattcutts.com/blog/how-to-fetch-a-url-with-curl-or-wget-silently/#comment-375463</link>
		<dc:creator>Aneem</dc:creator>
		<pubDate>Thu, 13 Aug 2009 15:30:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattcutts.com/blog/how-to-fetch-a-url-with-curl-or-wget-silently/#comment-375463</guid>
		<description>How to fetch a url and save it in another folder rather than existing/root folder?</description>
		<content:encoded><![CDATA[<p>How to fetch a url and save it in another folder rather than existing/root folder?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Spector</title>
		<link>http://www.mattcutts.com/blog/how-to-fetch-a-url-with-curl-or-wget-silently/#comment-336639</link>
		<dc:creator>David Spector</dc:creator>
		<pubDate>Thu, 28 May 2009 23:55:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattcutts.com/blog/how-to-fetch-a-url-with-curl-or-wget-silently/#comment-336639</guid>
		<description>I&#039;m hoping I can use &quot;wget http://...?arg=value&amp;pwd=password&quot; in crontab to call a server I wrote to get a particular action done (it sends me the results in an email).</description>
		<content:encoded><![CDATA[<p>I&#8217;m hoping I can use &#8220;wget <a href="http://...?arg=value&amp;pwd=password" rel="nofollow">http://&#8230;?arg=value&amp;pwd=password</a>&#8221; in crontab to call a server I wrote to get a particular action done (it sends me the results in an email).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: دروس</title>
		<link>http://www.mattcutts.com/blog/how-to-fetch-a-url-with-curl-or-wget-silently/#comment-105017</link>
		<dc:creator>دروس</dc:creator>
		<pubDate>Thu, 24 May 2007 22:26:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattcutts.com/blog/how-to-fetch-a-url-with-curl-or-wget-silently/#comment-105017</guid>
		<description>Oh…for a min there I though wget –spider http://example.com would give me all the links spidered right from the default site page. Something like Google’s site:http://example.com

cgiproxy guy Said,
January 21, 2007 @ 7:06 am 

wget is a program with incredible untapped potential for most people

I personally like wget –delete-after http://website.com

it deletes the output after the execution, not as nice as quite or /dev/null 2&gt;&amp;1 but very powerful still.

also wget will work with tor, just a question of having tor proxy set up right on your server and digging for the additional commands.

Jeff Huckaby Said,
April 10, 2007 @ 7:21 pm 

Verbosity can be good. Wget or curl with their respective “quiet” options will silence some output from those scripts but not all. They will still likely show critical errors, which is why you may want the redirects to /dev/null. However, we often see cases where you need some errors but not others. wget has a -nv flag that is not verbose but not quiet. You can also use /etc/cron.d/filename on most linux systems to fine-tune your cron. You can specify a mail address within the file you place in this directory. This can be useful to alert someone in case of a problem.

Also, don’t overlook security. Run your crons with a user with as few privileges as possible. If you simply need to wget a file, then a normal user with no login privileges will often suffice. 

Lastly, don’t forget –tries=number option. This will have wget retry in case of a failure. Note the default is 20 retries unless a failure occurs. There is also a –retry-connrefused which will retry even when a connection is refused, useful for overloaded URLs. 

Lastly, there is the –timeout option. Always use this option if you are fetching URLs frequently. The default read timeout is 900 seconds. That’s 15 minutes! I’ve seen many servers with dozens of crons piled up because they are polling every 5 minutes but the server is slow, so they are waiting 10 minutes or so to get the data. The problem quickly snowballs out of control.

In brief, we recommend:
1. use the least privileged user as possible for the user running the cron.
2. explicitly set timeouts to work with your application
3. decide what level of error reporting you need and use -q -nv and/or /etc/cron.d as required.

These tips are mostly for wget but curl has many of the same options.

Lastly, one more security tip. We often create a “wgetforuser” which is wget with permission that users can use. We then set the main wget to only be used by root. This helps (does not prevent) some attacks where a wget command is passed into an insecure web application.



http://www.ihsac.com</description>
		<content:encoded><![CDATA[<p>Oh…for a min there I though wget –spider <a href="http://example.com" rel="nofollow">http://example.com</a> would give me all the links spidered right from the default site page. Something like Google’s site:http://example.com</p>
<p>cgiproxy guy Said,<br />
January 21, 2007 @ 7:06 am </p>
<p>wget is a program with incredible untapped potential for most people</p>
<p>I personally like wget –delete-after <a href="http://website.com" rel="nofollow">http://website.com</a></p>
<p>it deletes the output after the execution, not as nice as quite or /dev/null 2&gt;&amp;1 but very powerful still.</p>
<p>also wget will work with tor, just a question of having tor proxy set up right on your server and digging for the additional commands.</p>
<p>Jeff Huckaby Said,<br />
April 10, 2007 @ 7:21 pm </p>
<p>Verbosity can be good. Wget or curl with their respective “quiet” options will silence some output from those scripts but not all. They will still likely show critical errors, which is why you may want the redirects to /dev/null. However, we often see cases where you need some errors but not others. wget has a -nv flag that is not verbose but not quiet. You can also use /etc/cron.d/filename on most linux systems to fine-tune your cron. You can specify a mail address within the file you place in this directory. This can be useful to alert someone in case of a problem.</p>
<p>Also, don’t overlook security. Run your crons with a user with as few privileges as possible. If you simply need to wget a file, then a normal user with no login privileges will often suffice. </p>
<p>Lastly, don’t forget –tries=number option. This will have wget retry in case of a failure. Note the default is 20 retries unless a failure occurs. There is also a –retry-connrefused which will retry even when a connection is refused, useful for overloaded URLs. </p>
<p>Lastly, there is the –timeout option. Always use this option if you are fetching URLs frequently. The default read timeout is 900 seconds. That’s 15 minutes! I’ve seen many servers with dozens of crons piled up because they are polling every 5 minutes but the server is slow, so they are waiting 10 minutes or so to get the data. The problem quickly snowballs out of control.</p>
<p>In brief, we recommend:<br />
1. use the least privileged user as possible for the user running the cron.<br />
2. explicitly set timeouts to work with your application<br />
3. decide what level of error reporting you need and use -q -nv and/or /etc/cron.d as required.</p>
<p>These tips are mostly for wget but curl has many of the same options.</p>
<p>Lastly, one more security tip. We often create a “wgetforuser” which is wget with permission that users can use. We then set the main wget to only be used by root. This helps (does not prevent) some attacks where a wget command is passed into an insecure web application.</p>
<p><a href="http://www.ihsac.com" rel="nofollow">http://www.ihsac.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Huckaby</title>
		<link>http://www.mattcutts.com/blog/how-to-fetch-a-url-with-curl-or-wget-silently/#comment-101338</link>
		<dc:creator>Jeff Huckaby</dc:creator>
		<pubDate>Wed, 11 Apr 2007 02:21:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattcutts.com/blog/how-to-fetch-a-url-with-curl-or-wget-silently/#comment-101338</guid>
		<description>Verbosity can be good.  Wget or curl with their respective &quot;quiet&quot; options will silence some output from those scripts but not all.  They will still likely show critical errors, which is why you may want the redirects to /dev/null.  However, we often see cases where you need some errors but not others.  wget has a -nv flag that is not verbose but not quiet.  You can also use /etc/cron.d/filename on most linux systems to fine-tune your cron.  You can specify a mail address within the file you place in this directory.  This can be useful to alert someone in case of a problem.

Also, don&#039;t overlook security.  Run your crons with a user with as few privileges as possible.  If you simply need to wget a file, then a normal user with no login privileges will often suffice. 

Lastly, don&#039;t forget --tries=number option. This will have wget retry in case of a failure. Note the default is 20 retries unless a failure occurs.  There is also a --retry-connrefused which will retry even when a connection is refused, useful for overloaded URLs.  

Lastly, there is the --timeout option. Always use this option if you are fetching URLs frequently.  The default read timeout is 900 seconds. That&#039;s 15 minutes! I&#039;ve seen many servers with dozens of crons piled up because they are polling every 5 minutes but the server is slow, so they are waiting 10 minutes or so to get the data. The problem quickly snowballs out of control.

In brief, we recommend:
1. use the least privileged user as possible for the user running the cron.
2. explicitly set timeouts to work with your application
3. decide what level of error reporting you need and use -q -nv and/or /etc/cron.d as required.

These tips are mostly for wget but curl has many of the same options.

Lastly, one more security tip. We often create a &quot;wgetforuser&quot; which is wget with permission that users can use.  We then set the main wget to only be used by root. This helps (does not prevent) some attacks where a wget command is passed into an insecure web application.</description>
		<content:encoded><![CDATA[<p>Verbosity can be good.  Wget or curl with their respective &#8220;quiet&#8221; options will silence some output from those scripts but not all.  They will still likely show critical errors, which is why you may want the redirects to /dev/null.  However, we often see cases where you need some errors but not others.  wget has a -nv flag that is not verbose but not quiet.  You can also use /etc/cron.d/filename on most linux systems to fine-tune your cron.  You can specify a mail address within the file you place in this directory.  This can be useful to alert someone in case of a problem.</p>
<p>Also, don&#8217;t overlook security.  Run your crons with a user with as few privileges as possible.  If you simply need to wget a file, then a normal user with no login privileges will often suffice. </p>
<p>Lastly, don&#8217;t forget &#8211;tries=number option. This will have wget retry in case of a failure. Note the default is 20 retries unless a failure occurs.  There is also a &#8211;retry-connrefused which will retry even when a connection is refused, useful for overloaded URLs.  </p>
<p>Lastly, there is the &#8211;timeout option. Always use this option if you are fetching URLs frequently.  The default read timeout is 900 seconds. That&#8217;s 15 minutes! I&#8217;ve seen many servers with dozens of crons piled up because they are polling every 5 minutes but the server is slow, so they are waiting 10 minutes or so to get the data. The problem quickly snowballs out of control.</p>
<p>In brief, we recommend:<br />
1. use the least privileged user as possible for the user running the cron.<br />
2. explicitly set timeouts to work with your application<br />
3. decide what level of error reporting you need and use -q -nv and/or /etc/cron.d as required.</p>
<p>These tips are mostly for wget but curl has many of the same options.</p>
<p>Lastly, one more security tip. We often create a &#8220;wgetforuser&#8221; which is wget with permission that users can use.  We then set the main wget to only be used by root. This helps (does not prevent) some attacks where a wget command is passed into an insecure web application.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cgiproxy guy</title>
		<link>http://www.mattcutts.com/blog/how-to-fetch-a-url-with-curl-or-wget-silently/#comment-94078</link>
		<dc:creator>cgiproxy guy</dc:creator>
		<pubDate>Sun, 21 Jan 2007 15:06:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattcutts.com/blog/how-to-fetch-a-url-with-curl-or-wget-silently/#comment-94078</guid>
		<description>wget is a program with incredible untapped potential for most people

I personally like wget --delete-after http://website.com

it deletes the output after the execution, not as nice as quite or  /dev/null 2&gt;&amp;1 but very powerful still.

also wget will work with tor, just a question of having tor proxy set up right on your server and digging for the additional commands.</description>
		<content:encoded><![CDATA[<p>wget is a program with incredible untapped potential for most people</p>
<p>I personally like wget &#8211;delete-after <a href="http://website.com" rel="nofollow">http://website.com</a></p>
<p>it deletes the output after the execution, not as nice as quite or  /dev/null 2&gt;&amp;1 but very powerful still.</p>
<p>also wget will work with tor, just a question of having tor proxy set up right on your server and digging for the additional commands.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anjanesh</title>
		<link>http://www.mattcutts.com/blog/how-to-fetch-a-url-with-curl-or-wget-silently/#comment-93320</link>
		<dc:creator>Anjanesh</dc:creator>
		<pubDate>Tue, 09 Jan 2007 02:22:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattcutts.com/blog/how-to-fetch-a-url-with-curl-or-wget-silently/#comment-93320</guid>
		<description>Oh...for a min there I though &lt;b&gt;wget --spider http://example.com&lt;/b&gt; would give me all the links spidered right from the default site page. Something like Google&#039;s site:http://example.com</description>
		<content:encoded><![CDATA[<p>Oh&#8230;for a min there I though <b>wget &#8211;spider <a href="http://example.com" rel="nofollow">http://example.com</a></b> would give me all the links spidered right from the default site page. Something like Google&#8217;s site:http://example.com</p>
]]></content:encoded>
	</item>
</channel>
</rss>
