[go: up one dir, main page]

Menu

[0e7a2c]: / man / shmcat.man  Maximize  Restore  History

Download this file

76 lines (75 with data), 2.5 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.TH SHMCAT "1" "September 2012" "shmcat(1)"
.SH NAME
shmcat \- dump System V shared memory segments, files, standard input and/or text
.SH SYNOPSIS
.B shmcat [
.I OPTION
.B ]... [
.I OPERAND
.B ]...
.SH DESCRIPTION
Dump System V shared memory segments, files, standard input and/or text to
standard output. If no OPERAND is given, read standard input only. If more
than one OPERAND is given, dump them in order. If some of the OPERANDs
cannot be read, shmcat prints an error message to standard error and tries
to continue with the other OPERANDs.
.PP
If shmcat has been compiled without \fBgetopt_long(3)\fR support, only the
short, one character OPTIONs and OPERANDs can be used. Otherwise the long ones
are also available. When a long OPTION or OPERAND needs an argument, the short
versions do so, as well.
.SH OPTIONS
.TP
\fB-h\fR, \fB-?\fR, \fB--help\fR
Display usage information and quit without dumping anything.
.TP
\fB-V\fR, \fB--version\fR
Show version information and quit without further action.
.SH OPERANDS
.TP
\fB-f\fR, \fB--file=\fIFILENAME\fR
Dump the contents of the given file.
.TP
\fB-i\fR, \fB--stdin\fR
Dump standard input.
.TP
\fB-M\fR, \fB--shmkey=\fIKEY\fR
Dump the shared memory object with the given key. The key can be given as a
decimal (no prefix), octal (prefix \fB0\fR), or hexadecimal (prefix \fB0x\fR)
number. It can, for example, be obtained using the \fBipcs(1)\fR or the
\fBftok(1)\fR tool.
.TP
\fB-m\fR, \fB--shmid=\fIID\fR
Dump the shared memory object with the given id. The id can be given as a
decimal (no prefix), octal (prefix \fB0\fR), or hexadecimal (prefix \fB0x\fR)
number. It can, for example, be obtained using the \fBipcs(1)\fR tool.
.TP
\fB-n\fR, \fB--newline\fR
Add a line feed.
.TP
\fB-t\fR, \fB--text=\fITEXT\fR
Print the given text.
.SH EXIT CODES
.TP
0
No errors, every OPERAND requested was dumped
.TP
1
There was an error while dumping at least one OPERAND, but the program continued with the other OPERANDs (if given)
.TP
2
There was a fatal error, usually this means that shmcat could not write to standard output
.TP
10
Wrong usage of the program
.SH NOTES
Usually, when you dump shared memory segments, you should redirect the
output of shmcat to a file or a program like \fBod(1)\fR, because shared
memory data usually has a binary form and thus it may contain
non-printable characters. You also probably want to suspend the processes
writing to the shared memory object in order to get a consistent dump.
.SH AUTHOR
Stefan Gast
.SH "SEE ALSO"
.BR ftok(1),
.BR ipcs(1)