MEMCP(1)

πŸ’… MEMCP(1) β€” like, the libmemcached-awesome one, bestie

okay so we're in libmemcached-awesome land and this lil cutie is memcp(1). she copies files into memcached, she's iconic, she's basically cp(1)'s cooler cousin. let's get into it ✨


πŸŽ€ SYNOPSIS

memcp [options] --servers <hostname[:port]...> <file...>

Copy files to a collection of memcached servers. that's the whole vibe, fr fr πŸ’–


🌸 DESCRIPTION

So memcp copies one or more files into memcached(1) servers. literally that's it. it's giving standard UNIX cp(1) energy, just... memcached-ified πŸ¦‹

and here's the cute part: the key names will be the names of the files, without any directory path. so like, just the filename itself, no folders attached. slay πŸ’…


✨ OPTIONS ✨

okay bestie, buckle up, there are a LOT of these and each one is a little gem:

  • -h, --help β€” Display help. your "what is going on" button 🫢
  • -V, --version β€” Display version.
  • -q, --quiet β€” Operate quietly. shhh 🀫
  • -v, --verbose β€” Operate more verbosely. tell me EVERYTHING.
  • -d, --debug β€” See -v|--verbose. yeah, it's the same thing, they're twins πŸ’€
  • -e, --expire <expiration> β€” Use expiration seconds (or a UNIX timestamp).
  • -H, --hash <algorithm> β€” Use algorithm as key hash algo. see memcached_behavior_t::MEMCACHED_BEHAVIOR_HASH.
  • -s, --servers <list of servers> β€” Specify the list of servers as hostname[:port][,hostname[:port]...].
  • -n, --non-blocking β€” Enable non-blocking operations.
  • -N, --tcp-nodelay β€” Disable Nagle's algorithm.
  • -b, --binary β€” Enable binary protocol.
  • -B, --buffer β€” Buffer requests.
  • -u, --username <username> β€” Use username for SASL authentication.
  • -p, --password <password> β€” Use password for SASL authentication.
  • -F, --flags <number> β€” Use number as key's flags.
  • -U, --udp β€” Enable UDP operation mode.
  • -S, --set β€” Issue SET command(s). this is the default mode, main character behavior πŸ‘‘ see also -A|--add and -R|--replace.
  • -A, --add β€” Issue ADD command(s).
  • -R, --replace β€” Issue REPLACE command(s).
  • -., --basename β€” Use basename of path as key (default). the og πŸŽ€
  • -+, --relative β€” Use relative path (as passed), instead of basename only.
  • -/, --absolute β€” Use absolute path (real path), instead of basename only.
and yes bestie, those last three are literally -., -+ and -/ as flags. punctuation flags. they ate and left no crumbs πŸ’€πŸ”₯

🌈 ENVIRONMENT

  • MEMCACHED_SERVERS β€” Specify a list of servers.

that's it, one env var, and she's doing her job πŸ’œ


πŸ“ NOTES

🧚 PROGRAM PREFIX

so the prefix of this program is variable, which means it can be configured at build time. fancy ✨

usually the client programs of libmemcached-awesome are prefixed with mem, like memcat or memcp.

but here's the plot twist: it can be configured though, to replace the prefix with something else like mc. and in case of that, the client programs of libmemcached-awesome would be called mccat, mccp, etc. respectively. so if your binary is named something weird, that's why, no cap 🫢


πŸ‘€ SEE ALSO

go read those too, iykyk πŸ’–


and that's the whole page bestie!! 🌸 this one's version 1.1, dated Jul 18, 2024 β€” so like, a lil vintage but still absolutely serving πŸ’…βœ¨ mwah, go copy some files πŸŽ€

πŸ“¦ where this page comes from