NTFSCK(8)

NAME
ntfsck - check and repair a Linux ntfs filesystem.

SYNOPSIS
ntfsck [OPTIONS] device

DESCRIPTION
ntfsck is used to check the ntfs filesystem in linux. It will repair corrupted ntfs filesystem. ntfsck do not support journal replay. Windows ntfs filesystem and some commercial linux ntfs filesystem use journal. But there's no open-source ntfs filesystem to support journaling. So if you have storage which have journal data, it's better to repair in Windows. When the system has been shutdonw suddenly on linux, filesystem should be marked as dirty normally. Because linux ntfs filesystem does not support journaling, fsck should scan all disk for checking and repairing. ntfsck can be useful utility to check and repair ntfs filesystem in linux. device is a block device (e.g., /dev/sdc1) or file containing the ntfs filesystem. If device is mounted, then ntfsck will not be executed because it is not safe to run on mounted filesystem. If ntfsck is run in interactive mode, it will ask the user to fix each problem found in the filesystem. If you specify '-r' or not specify any option, ntfsck will execute with interactive mode. At that time, you should not specify -a/-p, -y, -C, -n option, because those options are mutually exclusive. (meaning that above options should be specified by just only one option) Meaning of -a/-p, -y, -n options is same as other fsck utilities's execpt -C option. -C option will exit after only checking device is dirty or not. It returns 0, if device is clean. return 1 if device is dirty. And, ntfsck will set clusters bitmap which is allocated to repairable inode even no-repair mode to prevent cluster duplication during fsck, or filesystem operations after mount without finishing checking filesystem.

OPTIONS

-a, --repair-auto
    Auto repair mode. This option does the same thing as the -p option. It is provided for backwards compatibility only; it is suggested that people use -p option if possible. This option should not be specified at the same time with -y, -n, -C options.

-C  Check only mode. Check if device volume is dirty or not. This option should not be specified at the same time with -a/-p, -y, -n options. ntfsck return zero, if device is clean, else return 1. (meaning that volume is dirty)

-n, --repair-no
    No repair mode. Open the filesystem read-only. This mode just check only problem of filesystem. And answer 'no' to all question. Even this mode, ntfsck will set cluster bitmap for all repairable candidate inode to prevent cluster duplication. This option should not be specified at the same time with -a/-p, -y, -C options.

-q, --quiet
    Do not print progress percent.

-r, --repair
    Interactive mode. Check and repair interactively. Now do not support 'yestoall' or 'notoall'. So you should input 'Y' or 'N' for all question for problem.

-p  Preen repair mode. ntfsck will fix any filesystem problems automatically without human intervention. Generally, fsck will try to fix automatically as possible. When it found a problem which require human interaction, fsck print problem and ask input from human. But now this option is same as -y in ntfsck.

-y, --repair-yes
    Yes repair mode. Assume an answer of 'yes' to all questions. This option should not be specified at the same time with -a/-p, -n, -C options.

-y --verbose

-V --version
    Print ntfsck version.

EXIT CODES
All exit codes returned by ntfsck are listed below:
    0    - No errors
    1    - Filesystem errors corrected
    2    - Filesystem errors corrected, need to reboot
    4    - Filesystem errors left uncorrected
    8    - Operational error
    16    - Usage or syntax error
    32    - Canceled by user interrupt
    64    - Not supported filesystem
    128    - Shared library error

EXAMPLES
Normal usage (auto repair mode) for repairing /dev/sdc1:

    ntfsck -a /dev/sdc1

AUTHORS
ntfsck was written by Namjae Jeon <linkinjeon@kernel.org> with contributions from Jay Sim.

AVAILIBILITY
ntfsck is part of the ntfsprogs-plus package and is available at:
https://github.com/ntfsprogs-plus/ntfsprogs-plus

BUG REPORTS
If you found a problem which ntfsck cannot repair filesystem, then you may dump disk image using ntfsclone and send it to above github homepage for debugging. Sample of dumping image using ntfsclone:

    ntfsclone -o <target image name> -f -m --ignore-fs-check <device>

You can also refer ntfsclone(8) to know further information.

SEE ALSO
ntfsclone(8) ntfsinfo(8) ntfscluster(8) ntfsprogs-plus(8)