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
Advertisements

bash and or


Some good syntax examples for using and or within bash.

AND

use -a on the statement

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

OR

use -o on the statement

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