4 <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
5 <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
9 <meta name=
"viewport" content=
"width=device-width, initial-scale=1.0">
11 <title>memcp
— libmemcached
1.1.0 documentation
</title>
20 <script type=
"text/javascript" src=
"../_static/js/modernizr.min.js"></script>
23 <script type=
"text/javascript" id=
"documentation_options" data-url_root=
"../" src=
"../_static/documentation_options.js"></script>
24 <script type=
"text/javascript" src=
"../_static/jquery.js"></script>
25 <script type=
"text/javascript" src=
"../_static/underscore.js"></script>
26 <script type=
"text/javascript" src=
"../_static/doctools.js"></script>
27 <script type=
"text/javascript" src=
"../_static/language_data.js"></script>
29 <script type=
"text/javascript" src=
"../_static/js/theme.js"></script>
34 <link rel=
"stylesheet" href=
"../_static/css/theme.css" type=
"text/css" />
35 <link rel=
"stylesheet" href=
"../_static/pygments.css" type=
"text/css" />
36 <link rel=
"index" title=
"Index" href=
"../genindex.html" />
37 <link rel=
"search" title=
"Search" href=
"../search.html" />
38 <link rel=
"copyright" title=
"Copyright" href=
"../copyright.html" />
39 <link rel=
"next" title=
"memtouch" href=
"memtouch.html" />
40 <link rel=
"prev" title=
"memcat" href=
"memcat.html" />
43 <body class=
"wy-body-for-nav">
46 <div class=
"wy-grid-for-nav">
48 <nav data-toggle=
"wy-nav-shift" class=
"wy-nav-side">
49 <div class=
"wy-side-scroll">
50 <div class=
"wy-side-nav-search" >
54 <a href=
"../index.html" class=
"icon icon-home"> libmemcached
71 <form id=
"rtd-search-form" class=
"wy-form" action=
"../search.html" method=
"get">
72 <input type=
"text" name=
"q" placeholder=
"Search docs" />
73 <input type=
"hidden" name=
"check_keywords" value=
"yes" />
74 <input type=
"hidden" name=
"area" value=
"default" />
81 <div class=
"wy-menu wy-menu-vertical" data-spy=
"affix" role=
"navigation" aria-label=
"main navigation">
89 <li class=
"toctree-l1"><a class=
"reference internal" href=
"../libmemcached.html">Introduction
</a></li>
90 <li class=
"toctree-l1"><a class=
"reference internal" href=
"../libmemcached/index.html">libmemcached API
</a></li>
91 <li class=
"toctree-l1"><a class=
"reference internal" href=
"../libmemcachedutil/index.html">libmemcachedutil API
</a></li>
92 <li class=
"toctree-l1"><a class=
"reference internal" href=
"../libhashkit/index.html">libhashkit API
</a></li>
93 <li class=
"toctree-l1 current"><a class=
"reference internal" href=
"index.html">Client Applications
</a><ul class=
"current">
94 <li class=
"toctree-l2"><a class=
"reference internal" href=
"memexist.html">memexist — Check for the existence of a key
</a></li>
95 <li class=
"toctree-l2"><a class=
"reference internal" href=
"memcat.html">memcat —
"cat
" data from a server
</a></li>
96 <li class=
"toctree-l2 current"><a class=
"current reference internal" href=
"#">memcp —
"cp
" files to a server
</a></li>
97 <li class=
"toctree-l2"><a class=
"reference internal" href=
"memtouch.html">memtouch —
"touch
" a key
</a></li>
98 <li class=
"toctree-l2"><a class=
"reference internal" href=
"memrm.html">memrm –
"rm
" a key
</a></li>
99 <li class=
"toctree-l2"><a class=
"reference internal" href=
"memaslap.html">memaslap - Load testing and benchmarking a server
</a></li>
100 <li class=
"toctree-l2"><a class=
"reference internal" href=
"memslap.html">memslap - Load testing and benchmarking a server
</a></li>
101 <li class=
"toctree-l2"><a class=
"reference internal" href=
"memping.html">memping – Ping a server
</a></li>
102 <li class=
"toctree-l2"><a class=
"reference internal" href=
"memstat.html">memstat – Gather statistics from a server
</a></li>
103 <li class=
"toctree-l2"><a class=
"reference internal" href=
"memerror.html">memerror — Translate libmemcached error codes
</a></li>
104 <li class=
"toctree-l2"><a class=
"reference internal" href=
"memparse.html">memparse — Parse and validate an option string
</a></li>
105 <li class=
"toctree-l2"><a class=
"reference internal" href=
"memcapable.html">memcapable — Check a server's capabilities and compatibility
</a></li>
106 <li class=
"toctree-l2"><a class=
"reference internal" href=
"memdump.html">memdump — Dump a server's data
</a></li>
107 <li class=
"toctree-l2"><a class=
"reference internal" href=
"memflush.html">memflush — Flush a server (erase all cached data)
</a></li>
110 <li class=
"toctree-l1"><a class=
"reference internal" href=
"../libmemcached/index_misc.html">Miscellaneous
</a></li>
113 <li class=
"toctree-l1"><a class=
"reference internal" href=
"../changelogs.html">Change Logs
</a></li>
114 <li class=
"toctree-l1"><a class=
"reference internal" href=
"../copyright.html">Copyright
</a></li>
123 <section data-toggle=
"wy-nav-shift" class=
"wy-nav-content-wrap">
126 <nav class=
"wy-nav-top" aria-label=
"top navigation">
128 <i data-toggle=
"wy-nav-top" class=
"fa fa-bars"></i>
129 <a href=
"../index.html">libmemcached
</a>
134 <div class=
"wy-nav-content">
136 <div class=
"rst-content">
154 <div role=
"navigation" aria-label=
"breadcrumbs navigation">
156 <ul class=
"wy-breadcrumbs">
158 <li><a href=
"../index.html">Docs
</a> »</li>
160 <li><a href=
"index.html">Client Applications
</a> »</li>
165 <li class=
"wy-breadcrumbs-aside">
169 <a href=
"https://github.com/m6w6/libmemcached/blob/v1.x/docs/source/bin/memcp.rst" class=
"fa fa-github"> Edit on GitHub
</a>
180 <div role=
"main" class=
"document" itemscope=
"itemscope" itemtype=
"http://schema.org/Article">
181 <div itemprop=
"articleBody">
183 <div class=
"section" id=
"memcp">
184 <h1>memcp
<a class=
"headerlink" href=
"#memcp" title=
"Permalink to this headline">¶
</a></h1>
185 <div class=
"section" id=
"synopsis">
186 <h2>SYNOPSIS
<a class=
"headerlink" href=
"#synopsis" title=
"Permalink to this headline">¶
</a></h2>
187 <p>memcp [options] --servers
<hostname[:port]...
> <file...
></p>
188 <p>Copy files to a collection of memcached servers.
</p>
190 <div class=
"section" id=
"description">
191 <h2>DESCRIPTION
<a class=
"headerlink" href=
"#description" title=
"Permalink to this headline">¶
</a></h2>
192 <p><strong class=
"program">memcp
</strong> copies one or more files into
<em class=
"manpage"><a class=
"manpage reference external" href=
"https://linux.die.net/man/1/memcached">memcached(
1)
</a></em> servers.
193 It is similar to the standard UNIX
<em class=
"manpage"><a class=
"manpage reference external" href=
"https://linux.die.net/man/1/cp">cp(
1)
</a></em> command.
</p>
194 <p>The key names will be the names of the files, without any directory path.
</p>
196 <div class=
"section" id=
"options">
197 <h2>OPTIONS
<a class=
"headerlink" href=
"#options" title=
"Permalink to this headline">¶
</a></h2>
199 <dt id=
"cmdoption-memcp-help">
200 <code class=
"descname">--help
</code><code class=
"descclassname"></code><a class=
"headerlink" href=
"#cmdoption-memcp-help" title=
"Permalink to this definition">¶
</a></dt>
201 <dd><p>Display help.
</p>
205 <dt id=
"cmdoption-memcp-version">
206 <code class=
"descname">--version
</code><code class=
"descclassname"></code><a class=
"headerlink" href=
"#cmdoption-memcp-version" title=
"Permalink to this definition">¶
</a></dt>
207 <dd><p>Display version.
</p>
211 <dt id=
"cmdoption-memcp-quiet">
212 <code class=
"descname">--quiet
</code><code class=
"descclassname"></code><a class=
"headerlink" href=
"#cmdoption-memcp-quiet" title=
"Permalink to this definition">¶
</a></dt>
213 <dd><p>Operate quietly.
</p>
217 <dt id=
"cmdoption-memcp-verbose">
218 <code class=
"descname">--verbose
</code><code class=
"descclassname"></code><a class=
"headerlink" href=
"#cmdoption-memcp-verbose" title=
"Permalink to this definition">¶
</a></dt>
219 <dd><p>Operate more verbosely.
</p>
223 <dt id=
"cmdoption-memcp-debug">
224 <code class=
"descname">--debug
</code><code class=
"descclassname"></code><a class=
"headerlink" href=
"#cmdoption-memcp-debug" title=
"Permalink to this definition">¶
</a></dt>
225 <dd><p>See
<a class=
"reference internal" href=
"#cmdoption-memcp-verbose"><code class=
"xref std std-option docutils literal notranslate"><span class=
"pre">--verbose
</span></code></a>.
</p>
229 <dt id=
"cmdoption-memcp-servers">
230 <code class=
"descname">--servers
</code><code class=
"descclassname"> <list of servers
></code><a class=
"headerlink" href=
"#cmdoption-memcp-servers" title=
"Permalink to this definition">¶
</a></dt>
231 <dd><p>Specify the list of servers as
<em>hostname[:port][,hostname[:port]...]
</em>.
</p>
235 <dt id=
"cmdoption-memcp-binary">
236 <code class=
"descname">--binary
</code><code class=
"descclassname"></code><a class=
"headerlink" href=
"#cmdoption-memcp-binary" title=
"Permalink to this definition">¶
</a></dt>
237 <dd><p>Enable binary protocol.
</p>
241 <dt id=
"cmdoption-memcp-expire">
242 <code class=
"descname">--expire
</code><code class=
"descclassname"> <expiration
></code><a class=
"headerlink" href=
"#cmdoption-memcp-expire" title=
"Permalink to this definition">¶
</a></dt>
243 <dd><p>Use
<em>expiration
</em> seconds (or a UNIX timestamp).
</p>
247 <dt id=
"cmdoption-memcp-flag">
248 <code class=
"descname">--flag
</code><code class=
"descclassname"> <number
></code><a class=
"headerlink" href=
"#cmdoption-memcp-flag" title=
"Permalink to this definition">¶
</a></dt>
249 <dd><p>Use
<em>number
</em> as flag.
</p>
253 <dt id=
"cmdoption-memcp-hash">
254 <code class=
"descname">--hash
</code><code class=
"descclassname"> <algorithm
></code><a class=
"headerlink" href=
"#cmdoption-memcp-hash" title=
"Permalink to this definition">¶
</a></dt>
255 <dd><p>Use
<em>algorithm
</em> as key hash algo.
256 See
<a class=
"reference internal" href=
"../libmemcached/memcached_behavior.html#_CPPv4N20memcached_behavior_t23MEMCACHED_BEHAVIOR_HASHE" title=
"memcached_behavior_t::MEMCACHED_BEHAVIOR_HASH"><code class=
"xref cpp cpp-enumerator docutils literal notranslate"><span class=
"pre">memcached_behavior_t::MEMCACHED_BEHAVIOR_HASH
</span></code></a>.
</p>
260 <dt id=
"cmdoption-memcp-username">
261 <code class=
"descname">--username
</code><code class=
"descclassname"> <username
></code><a class=
"headerlink" href=
"#cmdoption-memcp-username" title=
"Permalink to this definition">¶
</a></dt>
262 <dd><p>Use
<em>username
</em> for SASL authentication.
</p>
266 <dt id=
"cmdoption-memcp-password">
267 <code class=
"descname">--password
</code><code class=
"descclassname"> <password
></code><a class=
"headerlink" href=
"#cmdoption-memcp-password" title=
"Permalink to this definition">¶
</a></dt>
268 <dd><p>Use
<em>password
</em> for SASL authentication.
</p>
272 <dt id=
"cmdoption-memcp-udp">
273 <code class=
"descname">--udp
</code><code class=
"descclassname"></code><a class=
"headerlink" href=
"#cmdoption-memcp-udp" title=
"Permalink to this definition">¶
</a></dt>
274 <dd><p>Enable UDP operation mode.
</p>
278 <dt id=
"cmdoption-memcp-buffer">
279 <code class=
"descname">--buffer
</code><code class=
"descclassname"></code><a class=
"headerlink" href=
"#cmdoption-memcp-buffer" title=
"Permalink to this definition">¶
</a></dt>
280 <dd><p>Enable internal buffering of commands.
</p>
284 <dt id=
"cmdoption-memcp-set">
285 <code class=
"descname">--set
</code><code class=
"descclassname"></code><a class=
"headerlink" href=
"#cmdoption-memcp-set" title=
"Permalink to this definition">¶
</a></dt>
286 <dd><p>Issue
<em>SET
</em> command(s). This is the default mode.
287 See also
<a class=
"reference internal" href=
"#cmdoption-memcp-add"><code class=
"xref std std-option docutils literal notranslate"><span class=
"pre">--add
</span></code></a> and
<a class=
"reference internal" href=
"#cmdoption-memcp-replace"><code class=
"xref std std-option docutils literal notranslate"><span class=
"pre">--replace
</span></code></a>.
</p>
291 <dt id=
"cmdoption-memcp-add">
292 <code class=
"descname">--add
</code><code class=
"descclassname"></code><a class=
"headerlink" href=
"#cmdoption-memcp-add" title=
"Permalink to this definition">¶
</a></dt>
293 <dd><p>Issue
<em>ADD
</em> command(s).
</p>
297 <dt id=
"cmdoption-memcp-replace">
298 <code class=
"descname">--replace
</code><code class=
"descclassname"></code><a class=
"headerlink" href=
"#cmdoption-memcp-replace" title=
"Permalink to this definition">¶
</a></dt>
299 <dd><p>Issue
<em>REPLACE
</em> command(s).
</p>
303 <div class=
"section" id=
"environment">
304 <h2>ENVIRONMENT
<a class=
"headerlink" href=
"#environment" title=
"Permalink to this headline">¶
</a></h2>
306 <dt id=
"envvar-MEMCACHED_SERVERS">
307 <code class=
"descname">MEMCACHED_SERVERS
</code><a class=
"headerlink" href=
"#envvar-MEMCACHED_SERVERS" title=
"Permalink to this definition">¶
</a></dt>
308 <dd><p>Specify the list of servers.
</p>
312 <div class=
"section" id=
"see-also">
313 <h2>SEE ALSO
<a class=
"headerlink" href=
"#see-also" title=
"Permalink to this headline">¶
</a></h2>
315 <li><a class=
"reference internal" href=
"../libmemcached.html"><span class=
"doc">C/C++ Client Library for memcached
</span></a></li>
316 <li><a class=
"reference internal" href=
"../libmemcached/configuration.html"><span class=
"doc">libmemcached Configuration
</span></a></li>
317 <li><a class=
"reference internal" href=
"../libmemcached/memcached_behavior.html"><span class=
"doc">Behaviors of the library
</span></a></li>
328 <div class=
"rst-footer-buttons" role=
"navigation" aria-label=
"footer navigation">
330 <a href=
"memtouch.html" class=
"btn btn-neutral float-right" title=
"memtouch" accesskey=
"n" rel=
"next">Next
<span class=
"fa fa-arrow-circle-right"></span></a>
333 <a href=
"memcat.html" class=
"btn btn-neutral float-left" title=
"memcat" accesskey=
"p" rel=
"prev"><span class=
"fa fa-arrow-circle-left"></span> Previous
</a>
340 <div role=
"contentinfo">
342 © <a href=
"../copyright.html">Copyright
</a>
346 Built with
<a href=
"http://sphinx-doc.org/">Sphinx
</a> using a
<a href=
"https://github.com/rtfd/sphinx_rtd_theme">theme
</a> provided by
<a href=
"https://readthedocs.org">Read the Docs
</a>.
359 <script type=
"text/javascript">
361 SphinxRtdTheme.Navigation.enable(true);