Read Me
shmcat - a tool to dump System V shared memory segments, files and text
(C) 2012 by Stefan Gast
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
License: GPLv2 or later
Report bugs to: sgdev at arcor dot de
===============================================================================
Description:
shmcat is a tool to dump System V shared memory segments, files standard input
and/or text passed via the command line to standard output. The program can
dump several objects in sequence, similar to the cat (1) command.
The package comes with an optional utility called ftok that acts as a wrapper
to the library function of the same name.
===============================================================================
Compile and install in the usual GNU way:
cd SUBDIR
./configure
make
su -c 'make install'
The configure script supports several options (use ./configure --help for a
complete list), for example:
--disable-nls Disable translations. This includes program messages
and man pages. Currently only German translations are
available, so you probably want to use this option if
you are not a German speaker.
--disable-ftok Do not build the ftok utility.
If are going to install shmcat on FreeBSD, you probably want to configure with:
--manpath=/usr/local/man
Otherwise the man pages will be installed (by default) to /usr/local/share/man,
which is not in the default manpath of FreeBSD.
===============================================================================
Examples:
To dump a shared memory segment, given by key:
shmcat -M KEY > FILENAME
(where KEY is some shared memory key obtained via ipcs (1) or ftok (1),
and FILENAME is the file to write the content to)
To dump a shared memory segment, given by id:
shmcat -m ID > FILENAME
(where ID is some shared memory ID obtained via ipcs (1), and FILENAME
is the name of the file to write the content to)
You can dump several segments and files together with one call, e.g.:
shmcat -m ID -f SOME_FILE > FILENAME
Of course, you can also use command substitution and the ftok tool for the
key, e.g.:
shmcat -M `ftok SOME_FILE 65` > FILENAME
For more information, please see the man pages for shmcat (1) and ftok (1),
or type:
shmcat -h
ftok -h
As seen above, if you dump shared memory segments, you should redirect the
output of shmcat to a file or a program like od (1), because shared memory
data usually has a binary form and thus it may contain non-printable
characters.