Linux command
ntfsfix 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Fix
sudo ntfsfix [/dev/sdXN]
说明
ntfsfix fixes common NTFS problems that prevent the filesystem from being mounted. It resets the NTFS journal, clears the dirty flag, and repairs some structural issues without performing a full filesystem check. This tool is useful when Windows was not shut down properly and the NTFS partition is marked as needing a check (dirty). It allows Linux to mount the partition in read-write mode without booting into Windows first. For comprehensive NTFS repair, Windows' built-in chkdsk should be used, as ntfsfix only handles basic issues that prevent mounting.
参数
- -b, --clear-bad-sectors
- Clear the list of bad sectors
- -d, --clear-dirty
- Clear the dirty flag on the volume
- -n, --no-action
- Perform a dry run; don't actually write changes
FAQ
What is the ntfsfix command used for?
ntfsfix fixes common NTFS problems that prevent the filesystem from being mounted. It resets the NTFS journal, clears the dirty flag, and repairs some structural issues without performing a full filesystem check. This tool is useful when Windows was not shut down properly and the NTFS partition is marked as needing a check (dirty). It allows Linux to mount the partition in read-write mode without booting into Windows first. For comprehensive NTFS repair, Windows' built-in chkdsk should be used, as ntfsfix only handles basic issues that prevent mounting.
How do I run a basic ntfsfix example?
Run `sudo ntfsfix [/dev/sdXN]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -b, --clear-bad-sectors do in ntfsfix?
Clear the list of bad sectors