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