Using fsck under OS X

You must be in single-user mode:

sudo /sbin/shutdown now

To examine and repair the disks:

/sbin/fsck -y

To reboot:

/sbin/reboot