command: fsck
purpose: check and repair a Linux filesystem

syntax: fsck  [-lsAVRTMNP]  [-C  [fd]]  [-t fstype] [filesys...]  [--]
[fs-specific-options]

examples:

1. To check a specific filesystem /dev/sda6

    # fsck /dev/sda6

exit codes for fsck command

  0    No errors
  1    Filesystem errors corrected
  2    System should be rebooted
  4    Filesystem errors left uncorrected
  8    Operational error
 16   Usage or syntax error
 32   Fsck canceled by user request
128  Shared-library error

2. To list all fsck checker commands

    $ cd /sbin

    $ ls fsck*

3. To check all filesystems at once

    $ cd /etc/fstab
    $ fsck -A

4. To check the ext3 filesystem on drive for this example we must
    umount the filesystem first

    $ fsck -t ext3 /dev/sda6

5.  To force a filesystem check even if it is clean

     # fsck /dev/sda6 -f


regards,
dhanasekar
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines

Reply via email to