How can I delete all not used semaphores and shared memory with a single command on a UNIX-like system, e.g., Ubuntu?
This is how I do it in FreeBSD:
#!/usr/local/bin/bash for i in $(ipcs -a | grep "^s" | awk '{ print $2 }'); do echo "ipcrm -s $i" ipcrm -s $i done