某新手教程里写的“fsck 命令能够检查和修复大部分类型的 Linux 文件系统,包括本章早些时候讨论过的 ext 、ext2 、ext3 、ext4 、ReiserFS 、JFS 、XFS 、ZFS 以及 Btrfs 。该命令的格式是:
fsck options /dev/sdX
你可以在命令行上列出多个要检查的文件系统。文件系统可以通过设备名、在虚拟目录中的挂载点以及分配给文件系统的唯一 UUID 值来引用。”
$ tldr fsck
fsck
Check the integrity of a filesystem or repair it. The filesystem should be unmounted at the time the command is run.
More information:
https://manned.org/fsck.
- Check filesystem
/dev/sdXN
, reporting any damaged blocks:
sudo fsck {{/dev/sdXN}}
- Check filesystem
/dev/sdXN
, reporting any damaged blocks and interactively letting the user choose to repair each one:
sudo fsck -r {{/dev/sdXN}}
- Check filesystem
/dev/sdXN
, reporting any damaged blocks and automatically repairing them:
sudo fsck -a {{/dev/sdXN}}