fsck -y
The fsck program will scan your hard disk and try to fix any problems. This will take about 5 minutes. If there were problems that it fixed, after the scan you'll see the message: FILE SYSTEM WAS MODIFIED. In that case, run the fsck -y command again until it tells you your hard disk seems fine.
Then type the following command and hit Enter:
shutdown -nh now
Power your Mac back up and you're safely back in business!