Skip to content

Instantly share code, notes, and snippets.

@mwhooker
Last active December 25, 2015 22:29
Show Gist options
  • Save mwhooker/7050278 to your computer and use it in GitHub Desktop.
Save mwhooker/7050278 to your computer and use it in GitHub Desktop.
PREFIX="/home/ubuntu/service_platform/packer-amazon-chroot-volumes/"
for ROOT in /proc/*/root; do
LINK=$(readlink $ROOT)
if [ "$LINK" != "/" ]; then
PID=$(basename $(dirname "$ROOT"))
sudo kill -9 "$PID"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment