Linux command
fsck.exfat 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Check
fsck.exfat [/dev/sdXN]
Repair automatically
fsck.exfat -y [/dev/sdXN]
Repair interactively
fsck.exfat -r [/dev/sdXN]
Repair automatically
fsck.exfat -p -s [/dev/sdXN]
Check without repairing
fsck.exfat -n [/dev/sdXN]
Show verbose output
fsck.exfat -v [/dev/sdXN]
说明
fsck.exfat checks and repairs exFAT filesystems on Linux. It is part of the exfatprogs package, the official userspace utilities for the exFAT filesystem that was merged into the Linux kernel starting with version 5.7. The tool can detect and repair various filesystem corruptions including invalid boot sector parameters, incorrect cluster bitmap entries, invalid cluster chains, loops in cluster chains, and files sharing the same clusters. When the boot sector is corrupted but the backup boot sector is valid, it can restore the primary boot sector. Before running fsck.exfat, unmount the filesystem first. Use lsblk -f to identify the correct device name.
参数
- -r, --repair
- Repair the filesystem interactively, prompting before each fix.
- -y, --repair-yes
- Repair the filesystem automatically, answering yes to all questions.
- -n, --repair-no
- Check the filesystem without making any repairs (read-only mode).
- -p, --repair-auto
- Repair the filesystem automatically without prompts (same as -a).
- -a
- Repair automatically (alias for -p).
- -s
- Create files in /LOST+FOUND directory for orphaned clusters.
- -v, --verbose
- Print debug information during the check.
- -V, --version
- Show version information and exit.
- -h, --help
- Display help message and exit.
FAQ
What is the fsck.exfat command used for?
fsck.exfat checks and repairs exFAT filesystems on Linux. It is part of the exfatprogs package, the official userspace utilities for the exFAT filesystem that was merged into the Linux kernel starting with version 5.7. The tool can detect and repair various filesystem corruptions including invalid boot sector parameters, incorrect cluster bitmap entries, invalid cluster chains, loops in cluster chains, and files sharing the same clusters. When the boot sector is corrupted but the backup boot sector is valid, it can restore the primary boot sector. Before running fsck.exfat, unmount the filesystem first. Use lsblk -f to identify the correct device name.
How do I run a basic fsck.exfat example?
Run `fsck.exfat [/dev/sdXN]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -r, --repair do in fsck.exfat?
Repair the filesystem interactively, prompting before each fix.