Skip to content

Instantly share code, notes, and snippets.

@beezly
Created April 23, 2012 12:13
Show Gist options
  • Save beezly/2470561 to your computer and use it in GitHub Desktop.
Save beezly/2470561 to your computer and use it in GitHub Desktop.
Shell script to clear up IPC where no processes are attached
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