Skip to content

Instantly share code, notes, and snippets.

@ryancdavison
Last active October 24, 2023 02:18
Show Gist options
  • Save ryancdavison/b776a2911e46ecd4d01518f77f89fa8a to your computer and use it in GitHub Desktop.
Save ryancdavison/b776a2911e46ecd4d01518f77f89fa8a to your computer and use it in GitHub Desktop.
remove shared memory objects owned by "me".
#!/bin/bash
ME=`whoami`
ipcs -m
IPCS_M=`ipcs -m | egrep "0x[0-9a-f]+ [0-9]+" | grep $ME | cut -f2 -d" "`
for id in $IPCS_M; do
echo "ipcrm -m $id"
ipcrm -m $id;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment