NTFSCK

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXIT CODE
BUGS
AVAILABILITY
SEE ALSO

NAME

ntfsck − check and repair an NTFS file system

SYNOPSIS

ntfsck [options] device

DESCRIPTION

ntfsck will check and repair an NTFS file system located on device or an NTFS image file.

OPTIONS

Below is a summary of all the options that ntfsck accepts. Nearly all options have two equivalent names. The short name is preceded by and the long name is preceded by −−. Any single letter options, that don’t take an argument, can be combined into a single command, e.g. −fv is equivalent to −f −v. Long named options can be abbreviated to any unique prefix of their name.
−a
, −−automatic−repair

Repair the volume if it appears to be in need of a repair. This options makes ntfsck exit immediately if the volume appears to be in order (no dirty flag set, logfile clean, no hibernated Windows session, ...), but otherwise a full repair is performed.

−c, −−fast−check

Check if volume is dirty then exit. If the volume is dirty then the exit value will be 100. If used with −m/−−mount−check-only then also repairs any issues which prevent volume from being mounted.

−m, −−mount−check−only

Check if volume can be mounted safely and if volume can be mounted then exit. If volume cannot be mounted then fix it and exit. Also works if used with −c/−−fast−check.

−s, −−simulate

Simulate repair of the volume. This option caches all the changes made by ntfsck in memory and never writes to the device. This can be done with a write-protected volume to check what changes ntfsck would make if it would be able to write to it. Exit value will be the same as you’d expect during a normal repair.

−P, −−no−progress−bar

Don’t show progress bars.

−C, −−no−alloc−check

Don’t check cluster allocations. This option speeds up ntfsck. Use this option with caution.

−O, −−no−orpan−check

Don’t check for orphaned files. This option speeds up ntfsck.

−M, −−no−mft−scan

Don’t scan $MFT. This option typically slows down ntfsck.

−S, −−no−sync

Don’t sync NTFS metadata before exit. This option speeds up ntfsck however it’s safe to use only if device is not removed/ejected.

−F, −−file FILE

Check and repair FILE only. FILE is absolute path to a file or directory.

−i, −−inode NUMBER

Correct inode NUMBER only and its children.

−t, −−timeout SECONDS

Timeout in seconds before ntfsck will abort the volume check/repair. If specified, this sets an upper limit on the execution time of ntfsck. After the timeout occurs, ntfsck will clear all its pending tasks and return as soon as possible.

−f, −−force

This will override some sensible defaults. Use this option with caution.

−D, −−delete-crosslinked

Delete cross linked clusters.

−b, −−crosslinked-check

Run crosslinked check. Remember without this option we will see cross linked messages i.e. information regarding cross linked clusters will always appear in the output. It is disabled by default because resolving cross-links without data loss means moving clusters around which may take extra time if number of cross-linked clusters is high. If ntfsck with this option is run periodically then it can be switched on.

−e, −−delete-crosslinked-if-no-space

Delete cross linked clusters in case ntfsck cannot resolve them by moving to empty space.

−n, −−-check-duplicate-names

Enable duplicate name detection check.

−h, −−help

Show a list of options with a brief description of each one.

−V, −−version

Show the version number of ntfsck.

EXIT CODE

The exit code returned by ntfsck is one of the followings:  
0  − No errors or file system was successfully repaired  
1  − File system errors could not be corrected  
23  − Volume is read-only  
100  − Volume is dirty, needs check (−−fast-check was used)

BUGS

If you find a bug please send an email describing the problem to ntfs-support@tuxera.com.

AVAILABILITY

ntfsck is part of the Tuxera NTFS package.

SEE ALSO

mkntfs(8)