It turns out that the power surge had corrupted ifconfig and ps. Luckily I had a linux image on a CD and just copied ifconfig and ps to their appropriate directories and everything is fine.