fsck - check and repair a Linux filesystem ##检测和修复文件系统
-
SYNOPSIS:语法
fsck [-lrsAVRTMNP] [-C [fd]] [-t fstype] [filesystem…] [–] [fs-specific-options] -
l Lock the whole-disk device by an exclusive flock(2).#通过一个排他的flock封锁一整个磁盘设备。This option is recommended when more fsck(8) instances are executed in the same time. #这个选项在多个fsck实例在同一时间被执行时被推荐使用。
-
-r Report certain statistics for each fsck when it completes. These statistics include the exit status, the maximum run set size (in kilo‐bytes), the elapsed all-clock time and the user and system CPU time used by the fsck run.#报告数据包括:结束状态码,最大运行集合大小,命令执行时间,用户和系统使用CPU的时间。
-
-s Serialize fsck operations with -a or -p#自动纠错
-
-t fslist
Specifies the type(s) of filesystem to be checked. #指定文件系统类型 -
-C [fd] Display completion/progress bars for those filesystem checkers (currently only for ext2 and ext3) which support them. 只适用于ext2和ext3
-
-M Do not check mounted filesystems and return an exit code of 0 for mounted filesystems. 不检测挂载点
-
-N Don’t execute, just show what would be done.不执行只展示将做什么。
-
-A Walk through the /etc/fstab file and try to check all filesystems in one run. 试图检测所有的文件系统,经过 /etc/fstab文件
-
-R When checking all filesystems with the -A flag, skip the root filesystem. 跳过root
-
-a Automatically repair the filesystem without any questions 自动修复
-
-n For some filesystem-specific checkers, the -n option will cause the fs-specific fsck to avoid attempting to repair any problems, but simply report such problems to stdout.对于一些文件系统,避免修复任何文件系统问题,但是标准输出这个问题的简单描述
-
-r Interactively repair the filesystem 交互修复,不建议在多个fsck平行执行时。
-
-y For some filesystem-specific checkers, the -y option will cause the fs-specific fsck to always attempt to fix any detected filesystem corruption automatically. 自动修复所有检测到的问题,只对于一些特点的文件系统