Reboot when the reboot command dosent work!

To reboot a linux box when the server is not responding to the normal restart commands try the below commands.

reboot -f
echo b > /proc/sysrq-trigger

Kill all java threads

Quick way to kill all java threads quickly if you cant get them to stop using conventional means.

sudo kill -9 `ps -ef|grep java|grep -v grep|awk {'print $2'}`

bash and or

Some good syntax examples for using and or within bash.


use -a on the statement

if [ -f "$LOCK_FILE" -a $(echo  "$get") -eq $fail ]


use -o on the statement

if [ -f "$LOCK_FILE" -o $(echo  "$get") -eq $fail ]