May 052011
 

Some example accessing memcached from a shell using nc and echo

Storage Commands

set
add
get
gets
replace
append
prepend
cas
delete
command [key] [flags] [exptime] [bytes] [noreply]\r\n[value]\r

Parameters :

[key]			: the key of the data stored
[flags]			: 32-bit unsigned integer that the server store with the data (provided by the user), and return along the data when the item is retrieved
[exptime]		: expiration time in seconds, 0 mean no delay, if exptime is superior to 30 day, Memcached will use it as a UNIX timestamps for expiration
[bytes]			: number of bytes in the data block
[cas unique]		: unique 64-bit value of an existing entry (retrieved with gets command) to use with cas command
[noreply]		: optional parameter that inform the server to not send the reply

Continue reading »

Jul 092008
 

Overview

This document provides several examples of using the find command in a UNIX environment.

Finding Groups with Numeric Values

# find /db? -group 15 | xargs chgrp

Often a user or system administrator will encounter directories that have a numeric value. This is an indication a change user made to /etc/groups. The following two examples use the find command to look for any groups with a value of 15. When the find command locates one of these directories, it pipes it to the chgrp command using xargs to modify the numbered directory to dba. The only difference with the two examples is the starting directories:

# find /u[0,1]?/app/oradata -group 15 | xargs chgrp dba