How to check for file corruption on Linux?

In Linux, you can use fsck command for file corruption on a disk and repair it. To check and fix the corruption type the following in terminal , ofcourse you will need to change the argument based on the disk you think is corrupted:
NEVER RUN THIS COMMAND ON A MOUNTED PARTITION
Unmount the disk first or log into single user mode to do this.

# fsck /dev/sda5
fsck from util-linux 2.23.2
/dev/sda6: clean, 95/2240224 files, 3793506/4476416 blocks

Leave a Reply

Your email address will not be published. Required fields are marked *