Here is a quick tip that will show how you can tell your Linux system to perform a fsck on its partitions on the next reboot. Normally this will happen by default, after some time as configured in the filesystem at creation time (or changed later): after a number of days or a number of filesystem mounts. If you are using ext3 filesystems you can check these intervals configured with:
1 2 3 4 5 6 7 8
If for some reason, you want to force the system to run fsck on the next reboot just create an empty file called forcefsck in your system / like this:
During the first reboot the system will run fsck and after completing this it will also remove the /forcefsck file from the system.