{
    "mode": "man",
    "parameter": "ntfsundelete",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/ntfsundelete/8/json",
    "generated": "2026-06-02T23:27:25Z",
    "synopsis": "ntfsundelete [options] device",
    "sections": {
        "NAME": {
            "content": "ntfsundelete - recover a deleted file from an NTFS volume.\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "ntfsundelete [options] device\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "ntfsundelete has three modes of operation: scan, undelete and copy.\n",
            "subsections": [
                {
                    "name": "Scan",
                    "content": "The  default  mode,  scan  simply  reads  an  NTFS  Volume and looks for files that have been\ndeleted.  Then it will print a list giving the inode number, name and size.\n"
                },
                {
                    "name": "Undelete",
                    "content": "The undelete mode takes the files either matching  the  regular  expression  (option  -m)  or\nspecified  by  the inode-expressions and recovers as much of the data as possible.   It saves\nthe result to another location.  Partly for safety, but mostly  because  NTFS  write  support\nisn't finished.\n"
                },
                {
                    "name": "Copy",
                    "content": "This  is a wizard's option.  It will save a portion of the MFT to a file.  This probably only\nbe useful when debugging ntfsundelete\n"
                },
                {
                    "name": "Notes",
                    "content": "ntfsundelete only ever reads from the NTFS Volume.  ntfsundelete will never change  the  vol‐\nume.\n"
                }
            ]
        },
        "CAVEATS": {
            "content": "",
            "subsections": [
                {
                    "name": "Miracles",
                    "content": "ntfsundelete cannot perform the impossible.\n\nWhen a file is deleted the MFT Record is marked as not in use and the bitmap representing the\ndisk usage is updated.  If the power isn't turned off immediately, the free space, where  the\nfile  used  to live, may become overwritten.  Worse, the MFT Record may be reused for another\nfile.  If this happens it is impossible to tell where the file was on disk.\n\nEven if all the clusters of a file are not in use, there is no guarantee  that  they  haven't\nbeen overwritten by some short-lived file.\n"
                },
                {
                    "name": "Locale",
                    "content": "In NTFS all the filenames are stored as Unicode.  They will be converted into the current lo‐\ncale for display by ntfsundelete.  The utility has successfully displayed some  Chinese  pic‐\ntogram filenames and then correctly recovered them.\n"
                },
                {
                    "name": "Extended MFT Records",
                    "content": "In  rare circumstances, a single MFT Record will not be large enough to hold the metadata de‐\nscribing a file (a file would have to be in hundreds of fragments for this  to  happen).   In\nthese cases one MFT record may hold the filename, but another will hold the information about\nthe data.  ntfsundelete will not try and piece together such records.  It  will  simply  show\nunnamed files with data.\n"
                },
                {
                    "name": "Compressed and Encrypted Files",
                    "content": "ntfsundelete  cannot  recover compressed or encrypted files.  When scanning for them, it will\ndisplay as being 0% recoverable.\n"
                },
                {
                    "name": "The Recovered File's Size and Date",
                    "content": "To recover a file ntfsundelete has to read the file's metadata.   Unfortunately,  this  isn't\nalways  intact.   When  a file is deleted, the metadata can be left in an inconsistent state.\ne.g.  the file size may be zero; the dates of the file may be set to the time it was deleted,\nor random.\nTo  be safe ntfsundelete will pick the largest file size it finds and write that to disk.  It\nwill also try and set the file's date to the last modified date.  This date may be  the  cor‐\nrect last modified date, or something unexpected.\n"
                }
            ]
        },
        "OPTIONS": {
            "content": "Below is a summary of all the options that ntfsundelete accepts.  Nearly all options have two\nequivalent names.  The short name is preceded by - and the long name is preceded by --.   Any\nsingle  letter  options,  that don't take an argument, can be combined into a single command,\ne.g.  -fv is equivalent to -f -v.  Long named options can be abbreviated to any unique prefix\nof their name.\n",
            "subsections": [
                {
                    "name": "-b --byte",
                    "content": "If any clusters of the file cannot be recovered, the missing parts will be filled with\nthis byte.  The default is zeros.\n",
                    "flag": "-b",
                    "long": "--byte"
                },
                {
                    "name": "-C --case",
                    "content": "When scanning an NTFS volume, any filename matching  (using  the  --match  option)  is\ncase-insensitive.  This option makes the matching case-sensitive.\n",
                    "flag": "-C",
                    "long": "--case"
                },
                {
                    "name": "-c --copy",
                    "content": "This  wizard's  option  will write a block of MFT FILE records to a file.  The default\nfile is mft which will be created in the current directory.  This option can  be  com‐\nbined with the --output and --destination options.\n",
                    "flag": "-c",
                    "long": "--copy"
                },
                {
                    "name": "-d --destination",
                    "content": "This  option  controls  where  to put the output file of the --undelete and --copy op‐\ntions.\n",
                    "flag": "-d",
                    "long": "--destination"
                },
                {
                    "name": "-f --force",
                    "content": "This will override some sensible defaults, such as not overwriting an  existing  file.\nUse this option with caution.\n",
                    "flag": "-f",
                    "long": "--force"
                },
                {
                    "name": "-h --help",
                    "content": "Show a list of options with a brief description of each one.\n",
                    "flag": "-h",
                    "long": "--help"
                },
                {
                    "name": "-i --inodes",
                    "content": "Recover  the files with these inode numbers.  RANGE can be a single inode number, sev‐\neral numbers separated by commas \",\" or a range separated by a dash \"-\".\n",
                    "flag": "-i",
                    "long": "--inodes"
                },
                {
                    "name": "-m --match",
                    "content": "Filter the output by only looking for matching filenames.  The pattern can include the\nwildcards  '?', match exactly one character or '*', match zero or more characters.  By\ndefault the matching is case-insensitive.  To make the search case sensitive, use  the\n--case option.\n",
                    "flag": "-m",
                    "long": "--match"
                },
                {
                    "name": "-O --optimistic",
                    "content": "Recover parts of the file even if they are currently marked as in use.\n",
                    "flag": "-O",
                    "long": "--optimistic"
                },
                {
                    "name": "-o --output",
                    "content": "Use this option to set name of output file that --undelete or --copy will create.\n",
                    "flag": "-o",
                    "long": "--output"
                },
                {
                    "name": "-P --parent",
                    "content": "Display the parent directory of a deleted file.\n",
                    "flag": "-P",
                    "long": "--parent"
                },
                {
                    "name": "-p --percentage",
                    "content": "Filter  the  output of the --scan option, by only matching files with a certain amount\nof recoverable content.  Please read the caveats section for more details.\n",
                    "flag": "-p",
                    "long": "--percentage"
                },
                {
                    "name": "-q --quiet",
                    "content": "Reduce the amount of output to a minimum.  Naturally, it doesn't make sense to combine\nthis option with --scan.\n",
                    "flag": "-q",
                    "long": "--quiet"
                },
                {
                    "name": "-s --scan",
                    "content": "Search through an NTFS volume and print a list of files that could be recovered.  This\nis the default action of ntfsundelete.  This list can be filtered by  filename,  size,\npercentage recoverable or last modification time, using the --match, --size, --percent\nand --time options, respectively.\n\nThe output of scan will be:\n\nInode  Flags  %age     Date    Time    Size  Filename\n6038  FN..    93%  2002-07-17 13:42  26629  thesis.doc\n\n┌────────────────────────────────────────┐\n│Flag   Description                      │\n│F/D    File/Directory                   │\n│N/R    (Non-)Resident data stream       │\n│C/E    Compressed/Encrypted data stream │\n│!      Missing attributes               │\n└────────────────────────────────────────┘\n\nThe percentage field shows how much of the file can potentially be recovered.\n",
                    "flag": "-s",
                    "long": "--scan"
                },
                {
                    "name": "-S --size",
                    "content": "Filter the output of the --scan option, by looking for  a  particular  range  of  file\nsizes.   The  range may be specified as two numbers separated by a '-'.  The sizes may\nbe abbreviated using the suffixes k, m, g, t, for kilobytes, megabytes, gigabytes  and\nterabytes respectively.\n",
                    "flag": "-S",
                    "long": "--size"
                },
                {
                    "name": "-t --time",
                    "content": "Filter the output of the --scan option.  Only match files that have been altered since\nthis time.  The time must be given as number using a suffix of d, w, m,  y  for  days,\nweeks, months or years ago.\n",
                    "flag": "-t",
                    "long": "--time"
                },
                {
                    "name": "-T --truncate",
                    "content": "If  ntfsundelete  is  confident about the size of a deleted file, then it will restore\nthe file to exactly that size.  The default behaviour is to round up the size  to  the\nnearest cluster (which will be a multiple of 512 bytes).\n",
                    "flag": "-T",
                    "long": "--truncate"
                },
                {
                    "name": "-u --undelete",
                    "content": "Select  undelete  mode.   You  can  specify  the  files to be recovered using by using\n--match or --inodes options.  This option can be combined  with  --output,  --destina‐‐\ntion, and --byte.\n\nWhen the file is recovered it will be given its original name, unless the --output op‐\ntion is used.\n",
                    "flag": "-u",
                    "long": "--undelete"
                },
                {
                    "name": "-v --verbose",
                    "content": "Increase the amount of output that ntfsundelete prints.\n",
                    "flag": "-v",
                    "long": "--verbose"
                },
                {
                    "name": "-V --version",
                    "content": "Show the version number, copyright and license for ntfsundelete.\n",
                    "flag": "-V",
                    "long": "--version"
                }
            ]
        },
        "EXAMPLES": {
            "content": "Look for deleted files on /dev/hda1.\n\nntfsundelete /dev/hda1\n\nLook for deleted documents on /dev/hda1.\n\nntfsundelete /dev/hda1 -s -m '*.doc'\n\nLook for deleted files between 5000 and 6000000 bytes, with at least 90% of the data recover‐\nable, on /dev/hda1.\n\nntfsundelete /dev/hda1 -S 5k-6m -p 90\n\nLook for deleted files altered in the last two days\n\nntfsundelete /dev/hda1 -t 2d\n\nUndelete inodes 2, 5 and 100 to 131 of device /dev/sda1\n\nntfsundelete /dev/sda1 -u -i 2,5,100-131\n\nUndelete  inode number 3689, call the file 'work.doc', set it to recovered size and put it in\nthe user's home directory.\n\nntfsundelete /dev/hda1 -u -T -i 3689 -o work.doc -d ~\n\nSave MFT Records 3689 to 3690 to a file 'debug'\n\nntfsundelete /dev/hda1 -c 3689-3690 -o debug\n\n",
            "subsections": []
        },
        "BUGS": {
            "content": "There are some small limitations to ntfsundelete, but currently no known bugs.  If you find a\nbug please send an email describing the problem to the development team:\nntfs-3g-devel@lists.sf.net\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "ntfsundelete  was written by Richard Russon and Holger Ohmacht, with contributions from Anton\nAltaparmakov.  It was ported to ntfs-3g by Erik Larsson and Jean-Pierre Andre.\n",
            "subsections": []
        },
        "AVAILABILITY": {
            "content": "ntfsundelete is part of the ntfs-3g package and is available from:\nhttps://github.com/tuxera/ntfs-3g/wiki/\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "ntfsinfo(8), ntfsprogs(8)\n\n\n\nntfs-3g 2021.8.22                           November 2005                            NTFSUNDELETE(8)",
            "subsections": []
        }
    },
    "summary": "ntfsundelete - recover a deleted file from an NTFS volume.",
    "flags": [
        {
            "flag": "-b",
            "long": "--byte",
            "arg": null,
            "description": "If any clusters of the file cannot be recovered, the missing parts will be filled with this byte. The default is zeros."
        },
        {
            "flag": "-C",
            "long": "--case",
            "arg": null,
            "description": "When scanning an NTFS volume, any filename matching (using the --match option) is case-insensitive. This option makes the matching case-sensitive."
        },
        {
            "flag": "-c",
            "long": "--copy",
            "arg": null,
            "description": "This wizard's option will write a block of MFT FILE records to a file. The default file is mft which will be created in the current directory. This option can be com‐ bined with the --output and --destination options."
        },
        {
            "flag": "-d",
            "long": "--destination",
            "arg": null,
            "description": "This option controls where to put the output file of the --undelete and --copy op‐ tions."
        },
        {
            "flag": "-f",
            "long": "--force",
            "arg": null,
            "description": "This will override some sensible defaults, such as not overwriting an existing file. Use this option with caution."
        },
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "Show a list of options with a brief description of each one."
        },
        {
            "flag": "-i",
            "long": "--inodes",
            "arg": null,
            "description": "Recover the files with these inode numbers. RANGE can be a single inode number, sev‐ eral numbers separated by commas \",\" or a range separated by a dash \"-\"."
        },
        {
            "flag": "-m",
            "long": "--match",
            "arg": null,
            "description": "Filter the output by only looking for matching filenames. The pattern can include the wildcards '?', match exactly one character or '*', match zero or more characters. By default the matching is case-insensitive. To make the search case sensitive, use the --case option."
        },
        {
            "flag": "-O",
            "long": "--optimistic",
            "arg": null,
            "description": "Recover parts of the file even if they are currently marked as in use."
        },
        {
            "flag": "-o",
            "long": "--output",
            "arg": null,
            "description": "Use this option to set name of output file that --undelete or --copy will create."
        },
        {
            "flag": "-P",
            "long": "--parent",
            "arg": null,
            "description": "Display the parent directory of a deleted file."
        },
        {
            "flag": "-p",
            "long": "--percentage",
            "arg": null,
            "description": "Filter the output of the --scan option, by only matching files with a certain amount of recoverable content. Please read the caveats section for more details."
        },
        {
            "flag": "-q",
            "long": "--quiet",
            "arg": null,
            "description": "Reduce the amount of output to a minimum. Naturally, it doesn't make sense to combine this option with --scan."
        },
        {
            "flag": "-s",
            "long": "--scan",
            "arg": null,
            "description": "Search through an NTFS volume and print a list of files that could be recovered. This is the default action of ntfsundelete. This list can be filtered by filename, size, percentage recoverable or last modification time, using the --match, --size, --percent and --time options, respectively. The output of scan will be: Inode Flags %age Date Time Size Filename 6038 FN.. 93% 2002-07-17 13:42 26629 thesis.doc ┌────────────────────────────────────────┐ │Flag Description │ │F/D File/Directory │ │N/R (Non-)Resident data stream │ │C/E Compressed/Encrypted data stream │ │! Missing attributes │ └────────────────────────────────────────┘ The percentage field shows how much of the file can potentially be recovered."
        },
        {
            "flag": "-S",
            "long": "--size",
            "arg": null,
            "description": "Filter the output of the --scan option, by looking for a particular range of file sizes. The range may be specified as two numbers separated by a '-'. The sizes may be abbreviated using the suffixes k, m, g, t, for kilobytes, megabytes, gigabytes and terabytes respectively."
        },
        {
            "flag": "-t",
            "long": "--time",
            "arg": null,
            "description": "Filter the output of the --scan option. Only match files that have been altered since this time. The time must be given as number using a suffix of d, w, m, y for days, weeks, months or years ago."
        },
        {
            "flag": "-T",
            "long": "--truncate",
            "arg": null,
            "description": "If ntfsundelete is confident about the size of a deleted file, then it will restore the file to exactly that size. The default behaviour is to round up the size to the nearest cluster (which will be a multiple of 512 bytes)."
        },
        {
            "flag": "-u",
            "long": "--undelete",
            "arg": null,
            "description": "Select undelete mode. You can specify the files to be recovered using by using --match or --inodes options. This option can be combined with --output, --destina‐‐ tion, and --byte. When the file is recovered it will be given its original name, unless the --output op‐ tion is used."
        },
        {
            "flag": "-v",
            "long": "--verbose",
            "arg": null,
            "description": "Increase the amount of output that ntfsundelete prints."
        },
        {
            "flag": "-V",
            "long": "--version",
            "arg": null,
            "description": "Show the version number, copyright and license for ntfsundelete."
        }
    ],
    "examples": [
        "Look for deleted files on /dev/hda1.",
        "ntfsundelete /dev/hda1",
        "Look for deleted documents on /dev/hda1.",
        "ntfsundelete /dev/hda1 -s -m '*.doc'",
        "Look for deleted files between 5000 and 6000000 bytes, with at least 90% of the data recover‐",
        "able, on /dev/hda1.",
        "ntfsundelete /dev/hda1 -S 5k-6m -p 90",
        "Look for deleted files altered in the last two days",
        "ntfsundelete /dev/hda1 -t 2d",
        "Undelete inodes 2, 5 and 100 to 131 of device /dev/sda1",
        "ntfsundelete /dev/sda1 -u -i 2,5,100-131",
        "Undelete  inode number 3689, call the file 'work.doc', set it to recovered size and put it in",
        "the user's home directory.",
        "ntfsundelete /dev/hda1 -u -T -i 3689 -o work.doc -d ~",
        "Save MFT Records 3689 to 3690 to a file 'debug'",
        "ntfsundelete /dev/hda1 -c 3689-3690 -o debug"
    ],
    "see_also": [
        {
            "name": "ntfsinfo",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/ntfsinfo/8/json"
        },
        {
            "name": "ntfsprogs",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/ntfsprogs/8/json"
        }
    ]
}