innovative2001

Active Member
Jun 5, 2006
29
0
151
Hello,

I am not expert in perl, I have found one command

# ipcs -s | grep nobody | perl -e 'while (<STDIN>) { @a=split(/\s+/); print `ipcrm sem $a[1]`}'

any idea what it will do?
 

ffeingol

Well-Known Member
PartnerNOC
Nov 9, 2001
944
423
363
cPanel Access Level
DataCenter Provider
Code:
# ipcs -s | grep nobody | perl -e 'while (<STDIN>) { @a=split(/\s+/); print `ipcrm sem $a[1]`}'
the ipcs -s part lists the semaphore arrays. grep nobody looks for the ones owned by nobody (apache prob.). the per code loops thorugh that list and prints the 1st item in the list (which is the semaphore id.

Frank