]> git.ipfire.org Git - thirdparty/util-linux.git/blob - sys-utils/ipcrm.1
Merge branch 'eject-sparc' of https://github.com/mator/util-linux
[thirdparty/util-linux.git] / sys-utils / ipcrm.1
1 .\" Copyright 2002 Andre C. Mazzone (linuxdev@karagee.com)
2 .\" May be distributed under the GNU General Public License
3 .TH IPCRM "1" "July 2014" "util-linux" "User Commands"
4 .SH NAME
5 ipcrm \- remove certain IPC resources
6 .SH SYNOPSIS
7 .B ipcrm
8 [options]
9 .sp
10 .B ipcrm
11 .RB { shm | msg | sem }
12 .IR id ...
13 .SH DESCRIPTION
14 .B ipcrm
15 removes System V inter-process communication (IPC) objects
16 and associated data structures from the system.
17 In order to delete such objects, you must be superuser, or
18 the creator or owner of the object.
19 .PP
20 System V IPC objects are of three types: shared memory,
21 message queues, and semaphores.
22 Deletion of a message queue or semaphore object is immediate
23 (regardless of whether any process still holds an IPC
24 identifier for the object).
25 A shared memory object is only removed
26 after all currently attached processes have detached
27 .RB ( shmdt (2))
28 the object from their virtual address space.
29 .PP
30 Two syntax styles are supported. The old Linux historical syntax specifies
31 a three-letter keyword indicating which class of object is to be deleted,
32 followed by one or more IPC identifiers for objects of this type.
33 .PP
34 The SUS-compliant syntax allows the specification of
35 zero or more objects of all three types in a single command line,
36 with objects specified either by key or by identifier (see below).
37 Both keys and identifiers may be specified in decimal, hexadecimal
38 (specified with an initial '0x' or '0X'), or octal (specified with
39 an initial '0').
40 .PP
41 The details of the removes are described in
42 .BR shmctl (2),
43 .BR msgctl (2),
44 and
45 .BR semctl (2).
46 The identifiers and keys can be found by using
47 .BR ipcs (1).
48 .SH OPTIONS
49 .TP
50 \fB\-a\fR, \fB\-\-all\fR [\fBshm\fR] [\fBmsg\fR] [\fBsem\fR]
51 Remove all resources. When an option argument is provided, the removal is
52 performed only for the specified resource types. \fIWarning!\fR Do not use
53 .B \-a
54 if you are unsure how the software using the resources might react to missing
55 objects. Some programs create these resources at startup and may not have
56 any code to deal with an unexpected disappearance.
57 .TP
58 .BR \-M , " \-\-shmem\-key " \fIshmkey
59 Remove the shared memory segment created with
60 .I shmkey
61 after the last detach is performed.
62 .TP
63 .BR \-m , " \-\-shmem\-id " \fIshmid
64 Remove the shared memory segment identified by
65 .I shmid
66 after the last detach is performed.
67 .TP
68 .BR \-Q , " \-\-queue\-key " \fImsgkey
69 Remove the message queue created with
70 .IR msgkey .
71 .TP
72 .BR \-q , " \-\-queue\-id " \fImsgid
73 Remove the message queue identified by
74 .IR msgid .
75 .TP
76 .BR \-S , " \-\-semaphore\-key " \fIsemkey
77 Remove the semaphore created with
78 .IR semkey .
79 .TP
80 .BR \-s , " \-\-semaphore\-id " \fIsemid
81 Remove the semaphore identified by
82 .IR semid .
83 .TP
84 .BR \-V , " \-\-version"
85 Display version information and exit.
86 .TP
87 .BR \-h , " \-\-help"
88 Display help text and exit.
89 .SH NOTES
90 In its first Linux implementation, \fBipcrm\fR used the deprecated syntax
91 shown in the second line of the
92 .BR SYNOPSIS .
93 Functionality present in other *nix implementations of \fBipcrm\fR has since
94 been added, namely the ability to delete resources by key (not just
95 identifier), and to respect the same command-line syntax. For backward
96 compatibility the previous syntax is still supported.
97 .\" .SH AUTHORS
98 .\" Andre C. Mazzone (linuxdev@karagee.com)
99 .\" .br
100 .\" Krishna Balasubramanian (balasub@cis.ohio-state.edu)
101 .SH SEE ALSO
102 .nh
103 .BR ipcmk (1),
104 .BR ipcs (1),
105 .BR msgctl (2),
106 .BR msgget (2),
107 .BR semctl (2),
108 .BR semget (2),
109 .BR shmctl (2),
110 .BR shmdt (2),
111 .BR shmget (2),
112 .BR ftok (3)
113 .SH AVAILABILITY
114 The ipcrm command is part of the util-linux package and is available from
115 .UR https://\:www.kernel.org\:/pub\:/linux\:/utils\:/util-linux/
116 Linux Kernel Archive
117 .UE .