<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>netcat command &#8211; lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</title>
	<atom:link href="https://lifelinux.com/tag/netcat-command/feed/" rel="self" type="application/rss+xml" />
	<link>https://lifelinux.com</link>
	<description>All About Linux !</description>
	<lastBuildDate>Sat, 28 Jan 2012 18:16:55 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.5.3</generator>
	<item>
		<title>How To Flush The Entire Contents Of Memcache Server</title>
		<link>https://lifelinux.com/how-to-flush-the-entire-contents-of-memcache-server/</link>
					<comments>https://lifelinux.com/how-to-flush-the-entire-contents-of-memcache-server/#respond</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Sat, 28 Jan 2012 18:05:45 +0000</pubDate>
				<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[command telnet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[localhost]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[nc command]]></category>
		<category><![CDATA[nc command flush memcached]]></category>
		<category><![CDATA[netcat]]></category>
		<category><![CDATA[netcat command]]></category>
		<category><![CDATA[netcat command flush memcached]]></category>
		<category><![CDATA[network connections]]></category>
		<category><![CDATA[protocol]]></category>
		<category><![CDATA[server ip]]></category>
		<category><![CDATA[tcp]]></category>
		<category><![CDATA[telnet command]]></category>
		<category><![CDATA[telnet command flush memcached]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[unix utility]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1312</guid>

					<description><![CDATA[<p>If you use Memcached server to store application data, you may want to invalidate it once you deploy a new version to avoid corruption or weird results&#8230; In this article, I&#8217;ll show you How do I flush the entire contents of a Memcached server ? Using telnet command I often use telnet to flush the [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-flush-the-entire-contents-of-memcache-server/">How To Flush The Entire Contents Of Memcache Server</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>If you use Memcached server to store application data, you may want to invalidate it once you deploy a new version to avoid corruption or weird results&#8230; In this article, I&#8217;ll show you How do I flush the entire contents of a Memcached server ?<br />
<span id="more-1312"></span></p>
<h2>Using telnet command</h2>
<p>I often use telnet to flush the entire contents of Memcached server, type the following command</p>
<pre># telnet localhost 11211</pre>
<p>Output</p>
<pre>Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
<span style="color: #0000ff;">flush_all</span>
OK
<span style="color: #0000ff;">quit</span>
Connection to localhost closed by foreign host.</pre>
<p><strong>Where</strong><br />
&#8211; localhost: Memcached server instance<br />
&#8211; 11211: Memcached server port</p>
<h2>Using netcat command</h2>
<pre># echo "flush_all" | nc localhost 11211</pre>
<p>By default, nc (or netcat) creates a TCP socket either in listening mode (server socket) or a socket that is used in order to connect to a server (client mode). Actually, netcat does not care whether the socket is meant to be a server or a client. All it does is to take the data from stdin and transfer it to the other end across the network.</p>
<h2>Restart Memcached Server</h2>
<p>Login as root and type the following command</p>
<pre># /etc/init.d/memcached restart</pre>
<p>Restarting your application is not ideal however, you will lose anything cached in memory, cause delays to users trying to access your site, that sort of thing.</p>
<h2>Using PHP script</h2>
<p>Create php file with the following content</p>
<pre>
# vi flush_memcached.php
$memcache = new Memcache;
$memcache->connect('localhost', 11211);
$memcache->flush();
</pre>
<p>To execute this script, type the following command </p>
<pre>
# php flush_memcached.php
</pre>
<g:plusone href="https://lifelinux.com/how-to-flush-the-entire-contents-of-memcache-server/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-flush-the-entire-contents-of-memcache-server/">How To Flush The Entire Contents Of Memcache Server</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/how-to-flush-the-entire-contents-of-memcache-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
