System Administration Guide

How to See If a File System Needs Checking

  1. Become superuser.

  2. Check the file system.


    # fsck -m /dev/rdsk/device-name
    

    In this command, the state flag in the superblock of the file system you specify is checked to see whether the file system is clean or requires checking.

    If you omit the device argument, all the UFS file systems listed in /etc/vfstab with a fsck pass value greater than 0 are checked.

Example--Seeing If a File System Needs Checking

In this example, the first file system needs checking; the second file system does not:


# fsck -m /dev/rdsk/c0t0d0s6
** /dev/rdsk/c0t0d0s6
ufs fsck: sanity check: /dev/rdsk/c0t0d0s6 needs checking
# fsck -m /dev/rdsk/c0t0d0s7
** /dev/rdsk/c0t0d0s7
ufs fsck: sanity check: /dev/rdsk/c0t0d0s7 okay