ntfsfix
Fix common NTFS file system inconsistencies
TLDR
Fix a given NTFS partition
SYNOPSIS
ntfsfix [options] device
PARAMETERS
device
Specifies the block device or partition to be fixed. This should be the NTFS partition you wish to check.
-d
Sets the 'force dirty' flag. Useful if ntfsfix detects an unclean volume but you want to force Windows to run chkdsk without mounting the filesystem first.
-n
No-action flag. Does not actually perform any changes to the filesystem. Useful for testing.
-V
Displays version information.
-h
Displays help information.
DESCRIPTION
The ntfsfix utility is a tool included in the ntfsprogs package designed to repair some common NTFS filesystem inconsistencies. It's essential to understand that ntfsfix is NOT a comprehensive solution for all NTFS problems. It focuses primarily on resetting the NTFS journal file and scheduling an NTFS consistency check using chkdsk when the partition is next mounted under Windows.
ntfsfix is useful when an NTFS volume cannot be cleanly unmounted (e.g., due to a system crash or power outage) and you need to force a check upon the next mount under Windows. It's crucial to note that ntfsfix only modifies metadata relating to the journal file and pending checks, and therefore it is generally safe to run. However, it does NOT guarantee a complete filesystem repair. More significant errors typically require using the chkdsk utility within Windows.
This command is mainly intended to be used when dual-booting with Windows and having issues with the NTFS partition. It forces a Windows check after the next boot sequence to fix any possible errors. It's important to backup data before running this and similar programs, although ntfsfix is low risk, a damaged filesystem is always at risk when fixing it.
CAVEATS
ntfsfix is not a replacement for chkdsk. It only resets the journal and schedules a consistency check. Severe corruption requires chkdsk within Windows. Always back up your data before using any filesystem repair tool. Modifying an already damaged system always carries a risk.
EXIT CODES
The exit code is 0 on success or -1 on error.
HISTORY
ntfsfix is part of the ntfsprogs package, a suite of utilities for managing NTFS filesystems under Linux. Development began in the early 2000s to improve interoperability between Linux and Windows systems. It provides tools to create, resize, check, and repair NTFS partitions. ntfsfix remains a frequently used tool for minor NTFS issues on dual-boot systems. Over time it has been updated to support newer NTFS versions and improved error handling.
SEE ALSO
ntfsck(8), mkntfs(8)