fsck(1M)


fsck -- check and repair filesystems (generic)

Synopsis

fsck [-F FSType] [-V] [-m] [special . . .]

fsck [-F FSType] [-V] [current_options] [-o specific_options] [special . . .]

fsck [-F FSType] [-V] [-PLbyw] [special . . .]

Description

fsck audits and interactively repairs inconsistent conditions for filesystems. If the filesystem is inconsistent the user is prompted for concurrence before each correction is attempted. It should be noted that some corrective actions will result in some loss of data. The amount and severity of data loss may be determined from the diagnostic output. The default action for each correction is to wait for the user to respond yes or no.

The filesystem should be unmounted when fsck is used. If this is not possible, care should be taken that the system is quiescent and that it is rebooted immediately afterwards if the filesystem is a critical one, for example root.

current_options are options supported by the s5-specific module of fsck. Other FSTypes do not necessarily support these options. specific_options indicate suboptions specified in a comma-separated list of suboptions and/or keyword-attribute pairs for interpretation by the FSType-specific module of the command.

special represents a block or character special device (for example, /dev/rdsk/*, where the value of * is machine dependent). It is preferable that a character special device be used. fsck will not work on a block device if it is mounted. If special is not supplied, fsck looks through /etc/vfstab and executes fsck for all character specials in the ``fsckdev'' field of /etc/vfstab for which there is a numeric entry in the ``fsckpass'' field.

Command options


-F
Specify the FSType on which to operate. If -F FSType is not specified heuristics similiar to those used by fstyp(1M) are used to determine the file system type.


NOTE: This command executes faster if it is not required to autodetect file system types. If you are uncertain about the FSType, you can use the fstyp command to determine it.


-V
Echo the complete command line, but do not execute the command. The command line is generated by using the options and arguments provided by the user and adding to them information derived from /etc/vfstab. This option should be used to verify and validate the command line.

-m
Check but do not repair. This option checks that the filesystem is suitable for mounting.

-o
Specify FSType-specific options.

-P
Automatically audits and interactively repairs inconsistent conditions for all filesystems in /etc/vfstab in parallel. It uses the ``fsckpass'' field of /etc/vfstab to create a list of filesystems that need checking on separate disks. The filesystems are then scheduled for checking such that each disk has one filesystem being checked on that disk at a given time. -P supports the following suboptions:

-L
Requests that the ouput is arranged in order by filesystem.

-b
Prints the filesystem output in a brief terse format. Upon success, the command prints one line, per filesystem, which is a summary of fsck information.

-y
Assumes a "yes" response to all questions, and the interactive mode is circumvented.

-w
Averts confusion stemming from several different filesystems requesting interactive responses. Runs as expected upon success (either verbose or brief). If it fails, the parent fsck process collects the failure information, but defers any corrections until the rest of the filesystems have been checked.

Files


/etc/vfstab
list of default parameters for each filesystem

References

fsck_bfs(1M), fsck_dosfs(1M), fsck_s5(1M), fsck_sfs(1M), fsck_ufs(1M), fsck_vxfs(1M), fstyp(1M), mkfs(1M), vfstab(4)

Notices

This command may not be supported for all filesystem types.

This command has been updated to handle files greater than 2GB.


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004