Checking the integrity of a file system (fsck command)
Use the fsck command to check and interactively repair inconsistent file systems.
It is important to run this command on every file system as part of system initialization. You must be able to read the device file on which the file system resides (for example, the /dev/hd0 device). Normally, the file system is consistent, and the fsck command merely reports on the number of files, used blocks, and free blocks in the file system. If the file system is inconsistent, the fsck command displays information about the inconsistencies found and prompts you for permission to repair them. The fsck command is conservative in its repair efforts and tries to avoid actions that might result in the loss of valid data. In certain cases, however, the fsck command recommends the destruction of a damaged file.
no
response.- To check all the default file systems, type the following:
This form of the fsck command asks you for permission before making any changes to a file system.fsck
- To fix minor problems automatically with the default file systems, type
the following:
fsck -p
- To check the /dev/hd1 file system , type the following:
This checks the unmounted file system located on the /dev/hd1 device.fsck /dev/hd1