Linux fsck.ext2 command

Linux 命令大全Linux Command Encyclopedia

The Linux fsck.ext2 command is used to check the file system and attempt to repair errors.

When an error occurs in the ext2 file system, the fsck.ext2 command can be used to attempt to repair it.

Syntax

fsck.ext2 [-acdfFnprsStvVy][-b <分区第一个磁区地址>][-B <区块大小>][-C <反叙述器>][-I <inode缓冲区块数>][-l/L <损坏区块文件>][-P <处理inode大小>][外围设备代号]

Parameters:

  • -a Automatically repair the file system without asking any questions.
  • -b<first sector address of partition> Specify the starting address of the first sector of the partition, i.e., the Super Block.
  • -B<block size> Set the size of each block in the partition.
  • -c Check whether there are damaged blocks in the specified file system.
  • -C<reverse narrator> Specify the reverse narrator. The fsck.ext2 command will have all execution processes narrated in reverse by it, making it easy to troubleshoot or monitor the program execution.
  • -d Display the command execution process in detail, for troubleshooting or analyzing program execution.
  • -f Force a full check of the file system, even if no problems are found in a quick check.
  • -F Before checking the file system, first clear the data in the block area of the storage device.
  • -I<inode buffer block count> Set the number of blocks for the inode buffer of the file system to be checked.
  • -l<bad block file> Treat the blocks listed in the file as bad blocks and mark them, preventing applications from using those blocks.
  • -L<bad block file> This parameter has a similar effect to specifying the "-l" parameter, but before referring to the bad block file to mark bad blocks, it will first clear all previously marked bad blocks, i.e., reset them all rather than just adding new bad block markers.
  • -n Set the file system to be checked to read-only, disable interactive mode, and answer no to all questions.
  • -p This parameter has the same effect as specifying the "-a" parameter.
  • -P<inode size to process> Set the size of inode that the fsck.ext2 command can process.
  • -r This parameter will be ignored and not processed; it is only used to solve compatibility issues.
  • -s When checking the file system, swap the contents of each pair of bytes.
  • -S This parameter has a similar effect to specifying the "-s" parameter, but regardless of whether the file system is already in standard byte order, always swap the contents of each pair of bytes.
  • -t Display timing information of the fsck.ext2 command.
  • -v Display the command execution process in detail.
  • -V Display version information.
  • -y Disable interactive mode and agree to all questions asked.

Linux 命令大全Linux Command Encyclopedia

Other Extensions