Created
April 23, 2012 12:13
-
-
Save beezly/2470561 to your computer and use it in GitHub Desktop.
Shell script to clear up IPC where no processes are attached
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in `ipcs -m | awk '{ print $2 }'`; do ipcs -m -i $i | grep '\snattch=0$'; if [ $? -eq 0 ]; then ipcrm -m $i; fi; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment