NTFSCK(8)
β¨ ntfsck β check and repair a Linux ntfs filesystem β¨
okay bestie, welcome to the ntfsck(8) page π this is the system manager's manual moment, so buckle up.
πΈ NAME πΈ
ntfsck β check and repair a Linux ntfs filesystem. that's it, that's the whole job, and she does it.
π SYNOPSIS π
ntfsck [OPTIONS] device
π¦ DESCRIPTION π¦
okay so ntfsck is the girl you call to check the ntfs filesystem on linux, and she will repair a corrupted ntfs filesystem too. but listen β ntfsck does not support journal replay. read that again. Windows ntfs filesystems and some commercial linux ntfs filesystems use a journal, but there's no open-source ntfs filesystem that supports journaling. so if your storage has journal data on it? bestie, it's better to repair in Windows. no cap.
when the system has been shut down suddenly on linux, the filesystem should normally be marked as dirty. because the linux ntfs filesystem doesn't support journaling, fsck has to scan the entire disk for checking and repairing. that's the whole reason ntfsck is a useful utility for checking and repairing ntfs filesystems on linux. iconic behavior honestly. π
device is a block device (e.g., /dev/sdc1) or a file containing the ntfs filesystem. and if device is mounted, then ntfsck will not be executed, because running on a mounted filesystem is not safe. periodt.
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 you don't specify any option at all, ntfsck will execute in interactive mode. and at that time, you should not specify -a/-p, -y, -C, or -n options, because those options are mutually exclusive β meaning that above options should be specified by just only one option. the meaning of the -a/-p, -y, and -n options is the same as other fsck utilities', except for the -C option. the -C option will exit after only checking whether the device is dirty or not. it returns 0 if the device is clean. it returns 1 if the device is dirty.
and also, ntfsck will set the clusters bitmap which is allocated to a repairable inode even in no-repair mode β to prevent cluster duplication during fsck, or during filesystem operations after mount without finishing checking the filesystem. so yeah, she's doing stuff even when you told her not to touch anything. lowkey unhinged, highkey necessary. π
π OPTIONS π
-a,--repair-autoβ Auto repair mode. this does the exact same thing as the-poption. it's provided for backwards compatibility only, and it is suggested that people use the-poption if possible. this option should not be specified at the same time with the-y,-n, or-Coptions.-Cβ Check only mode. check if the device volume is dirty or not. this option should not be specified at the same time with the-a/-p,-y, or-noptions.ntfsckreturns zero if the device is clean, else it returns1(meaning that the volume is dirty).-n,--repair-noβ No repair mode. open the filesystem read-only. this mode just checks problems of the filesystem, and answers'no'to all questions. even in this mode,ntfsckwill set the cluster bitmap for all repairable candidate inodes to prevent cluster duplication. this option should not be specified at the same time with the-a/-p,-y, or-Coptions.-q,--quietβ do not print the progress percent. shhh. π€«-r,--repairβ Interactive mode. check and repair interactively. right now it does not support'yestoall'or'notoall', so you should input'Y'or'N'for all questions about a problem. every single one, bestie. no shortcuts.-pβ Preen repair mode.ntfsckwill fix any filesystem problems automatically without human intervention. generally,fsckwill try to fix automatically as much as possible, and when it finds a problem that requires human interaction,fsckprints the problem and asks for input from a human. but right now this option is the same as-yinntfsck.-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 the-a/-p,-n, or-Coptions.-y --verbose-V --versionβ printntfsckversion.
ok real talk, the page literally lists-ytwice, once as--repair-yesand once as-y --verbose, and I'm not about to pretend otherwise. the manual said what it said. π€·ββοΈ
β EXIT CODES β
all exit codes returned by ntfsck are listed below, and she keeps receipts:
0β No errors1β Filesystem errors corrected2β Filesystem errors corrected, need to reboot4β Filesystem errors left uncorrected8β Operational error16β Usage or syntax error32β Canceled by user interrupt64β Not supported filesystem128β Shared library error
π EXAMPLES π
normal usage (auto repair mode) for repairing /dev/sdc1:
ntfsck -a /dev/sdc1
look at her go. π
π AUTHORS π
ntfsck was written by Namjae Jeon <linkinjeon@kernel.org> with contributions from Jay Sim. giving credit where credit is due, as we always should. π«Ά
π§ 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 where ntfsck cannot repair a filesystem, then you may dump a disk image using ntfsclone and send it to the above github homepage for debugging. sample of dumping an image using ntfsclone:
ntfsclone -o <target image name> -f -m --ignore-fs-check <device>
you can also refer to ntfsclone(8) to know further information. π
π SEE ALSO π
ntfsclone(8) ntfsinfo(8) ntfscluster(8) ntfsprogs-plus(8)
and that's the whole page, bestie! ntfsprogs-plus 1.0.0, dated AUGUST 2023 β go forth and fsck responsibly, and please unmount first. mwah. πβ¨π
π¦ where this page comes from
- nixpkgs unstable: ntfsprogs-plus 1.0.0
- Copyright (c) 2023\-2024 Namjae jeon
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms