Wednesday, October 7, 2009

Unix command to remove queues,semaphores and shared memory segments

The following command will remove all the message queues,semaphores and shared memory segments which got created.

ipcs | awk  ' {print "ipcrm -" $1 " " $2}' |sh


If the queues ,shared memory segments and  semaphores of particulare user needs to be removed then the following command will be used.

ipcs | grep username | awk ' {print "ipcrm -" $1 " " $2}' | sh

1 comment:

Anonymous said...
This comment has been removed by a blog administrator.
Powered By Blogger