ipcs|awk '/bbs/ {system(sprintf("ipcrm shm %s",$2));}'
就可以了
【 在 risker@smth.org (gone with wind) 的大作中提到: 】
: 一个清除BBS相关东东的Perl Scripts.
: #! /usr/bin/perl -w
: #
: # Tools for clear BBS daemon
: # Risker, BUAA, 2002/1/6
: #
: # It kill all processes owned by 'bbs', and clear BBS's SHM. When BBS
: # need to be reboot, it's useful.
: # Notice! Here, the BBS user is 'bbs'. Change it according to your BBS.
: #
: .................(以下省略)
--
FROM 202.200.235.53