Menu

Tree [b3bf98] master /
 History

HTTPS access


File Date Author Commit
 m4 2012-02-21 Stefan Gast Stefan Gast [262cad] Initial commit
 man 2018-03-25 Stefan Gast Stefan Gast [69f682] man/shmcat.man: Fix of/off typo
 po 2022-08-08 Stefan Gast Stefan Gast [b3bf98] Update mail address
 src 2017-12-16 Stefan Gast Stefan Gast [179b08] shmcat-1.9
 .gitignore 2017-08-05 Stefan Gast Stefan Gast [c742de] configure.ac: Switch to tar.xz for future releases
 AUTHORS 2022-08-08 Stefan Gast Stefan Gast [b3bf98] Update mail address
 COPYING 2012-02-21 Stefan Gast Stefan Gast [262cad] Initial commit
 ChangeLog 2012-02-21 Stefan Gast Stefan Gast [262cad] Initial commit
 Makefile.am 2012-11-04 Stefan Gast Stefan Gast [bef634] Update project description in header comments
 NEWS 2017-12-16 Stefan Gast Stefan Gast [179b08] shmcat-1.9
 README 2022-08-08 Stefan Gast Stefan Gast [b3bf98] Update mail address
 autogen.sh 2016-08-12 Stefan Gast Stefan Gast [9bb4df] autogen.sh: Use the --force, when invoking auto...
 configure.ac 2022-08-08 Stefan Gast Stefan Gast [b3bf98] Update mail address
 logo.png 2012-11-06 Stefan Gast Stefan Gast [c9b17e] Add a (not really) fancy logo
 mkinstalldirs 2012-02-21 Stefan Gast Stefan Gast [262cad] Initial commit
 release.sh 2017-12-16 Stefan Gast Stefan Gast [48b468] release.sh: make dist-xz instead of dist-bzip2

Read Me

shmcat - a tool to dump shared memory segments, files and text
(C) 2012, 2014, 2016, 2017, 2022 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: dev at stefangast dot eu

===============================================================================

Description:

shmcat is a tool to dump shared memory segments (System V and/or POSIX), 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.

	--disable-posix-shm
			Disable POSIX shared memory support (shm_open
			and friends). Support for the (older) System V
			shared memory API (shmget, shmat...) will still
			be included.

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 System V 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 System V 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)

To dump a POSIX shared memory segment:
	shmcat -p /SHMNAME > FILENAME
	(where /SHMNAME is the name of the desired POSIX shared memory segment,
	and FILENAME is 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.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.