summaryrefslogtreecommitdiff
Diffstat
-rwxr-xr-xAndroid.mk138
-rwxr-xr-xAndroid.mk.bak89
-rwxr-xr-xCREDITS20
-rwxr-xr-xINSTALL200
-rwxr-xr-xMakefile715
-rwxr-xr-xMakefile.am106
-rwxr-xr-xMakefile.in955
-rwxr-xr-xNEWS4
-rwxr-xr-xREADME80
-rwxr-xr-xTODO.ntfsprogs126
-rwxr-xr-xaclocal.m47091
-rwxr-xr-xcompile21
-rwxr-xr-xconfig.guess292
-rw-r--r--[-rwxr-xr-x]config.h165
-rwxr-xr-xconfig.h.in110
-rwxr-xr-xconfig.log3290
-rwxr-xr-xconfig.status1220
-rwxr-xr-xconfig.sub104
-rwxr-xr-xconfigure26448
-rwxr-xr-xconfigure.ac291
-rwxr-xr-xdepcomp87
-rwxr-xr-xinclude/Makefile.in181
-rwxr-xr-xinclude/fuse-lite/Makefile.in112
-rwxr-xr-xinclude/fuse-lite/fuse.h61
-rwxr-xr-xinclude/fuse-lite/fuse_common.h49
-rwxr-xr-xinclude/fuse-lite/fuse_kernel.h6
-rwxr-xr-xinclude/fuse-lite/fuse_lowlevel.h20
-rwxr-xr-xinclude/ntfs-3g/Makefile.am4
-rwxr-xr-xinclude/ntfs-3g/Makefile.in163
-rwxr-xr-xinclude/ntfs-3g/acls.h3
-rwxr-xr-xinclude/ntfs-3g/attrib.h50
-rwxr-xr-xinclude/ntfs-3g/cache.h7
-rwxr-xr-xinclude/ntfs-3g/compat.h6
-rwxr-xr-xinclude/ntfs-3g/compress.h6
-rwxr-xr-xinclude/ntfs-3g/debug.h4
-rwxr-xr-xinclude/ntfs-3g/device.h18
-rwxr-xr-xinclude/ntfs-3g/device_io.h21
-rwxr-xr-xinclude/ntfs-3g/dir.h11
-rwxr-xr-xinclude/ntfs-3g/layout.h32
-rwxr-xr-xinclude/ntfs-3g/lcnalloc.h1
-rwxr-xr-xinclude/ntfs-3g/logging.h3
-rwxr-xr-xinclude/ntfs-3g/mst.h3
-rwxr-xr-xinclude/ntfs-3g/ntfstime.h12
-rwxr-xr-xinclude/ntfs-3g/param.h72
-rwxr-xr-xinclude/ntfs-3g/realpath.h24
-rwxr-xr-xinclude/ntfs-3g/runlist.h3
-rwxr-xr-xinclude/ntfs-3g/security.h20
-rwxr-xr-xinclude/ntfs-3g/types.h8
-rwxr-xr-xinclude/ntfs-3g/unistr.h13
-rwxr-xr-xinclude/ntfs-3g/volume.h78
-rwxr-xr-xinclude/ntfs-3g/xattrs.h75
-rwxr-xr-xinstall-sh5
-rwxr-xr-xlibfuse-lite/Makefile.am3
-rwxr-xr-xlibfuse-lite/Makefile.in188
-rwxr-xr-xlibfuse-lite/fuse.c418
-rwxr-xr-xlibfuse-lite/fuse_kern_chan.c2
-rwxr-xr-xlibfuse-lite/fuse_lowlevel.c53
-rwxr-xr-xlibfuse-lite/fuse_opt.c20
-rwxr-xr-xlibfuse-lite/fuse_session.c12
-rwxr-xr-xlibfuse-lite/fusermount.c97
-rwxr-xr-xlibfuse-lite/helper.c21
-rwxr-xr-xlibfuse-lite/mount.c486
-rwxr-xr-xlibfuse-lite/mount_util.c246
-rwxr-xr-xlibfuse-lite/mount_util.h11
-rwxr-xr-xlibntfs-3g/Makefile.am15
-rwxr-xr-xlibntfs-3g/Makefile.in420
-rwxr-xr-xlibntfs-3g/acls.c219
-rwxr-xr-xlibntfs-3g/attrib.c1205
-rwxr-xr-xlibntfs-3g/bootsect.c4
-rwxr-xr-xlibntfs-3g/cache.c7
-rwxr-xr-xlibntfs-3g/compress.c962
-rwxr-xr-xlibntfs-3g/device.c252
-rwxr-xr-xlibntfs-3g/dir.c374
-rwxr-xr-xlibntfs-3g/efs.c217
-rwxr-xr-xlibntfs-3g/index.c30
-rwxr-xr-xlibntfs-3g/inode.c46
-rwxr-xr-xlibntfs-3g/lcnalloc.c36
-rw-r--r--libntfs-3g/libntfs-3g.pc10
-rw-r--r--libntfs-3g/libntfs-3g.script.so2
-rwxr-xr-xlibntfs-3g/logfile.c23
-rwxr-xr-xlibntfs-3g/logging.c24
-rwxr-xr-xlibntfs-3g/mft.c12
-rwxr-xr-xlibntfs-3g/mst.c24
-rwxr-xr-xlibntfs-3g/object_id.c9
-rwxr-xr-xlibntfs-3g/realpath.c103
-rwxr-xr-xlibntfs-3g/reparse.c67
-rwxr-xr-xlibntfs-3g/runlist.c62
-rwxr-xr-xlibntfs-3g/security.c345
-rwxr-xr-xlibntfs-3g/unistr.c244
-rwxr-xr-xlibntfs-3g/unix_io.c19
-rwxr-xr-xlibntfs-3g/volume.c365
-rwxr-xr-xlibntfs-3g/win32_io.c708
-rwxr-xr-xlibntfs-3g/xattrs.c791
-rwxr-xr-xlibtool9301
-rwxr-xr-xltmain.sh8439
-rwxr-xr-xm4/libtool.m47377
-rwxr-xr-xm4/ltoptions.m4368
-rwxr-xr-xm4/ltsugar.m4123
-rwxr-xr-xm4/ltversion.m423
-rwxr-xr-xm4/lt~obsolete.m492
-rwxr-xr-xmissing49
-rwxr-xr-xntfsprogs/Makefile.am154
-rwxr-xr-xntfsprogs/Makefile.in1199
-rwxr-xr-xntfsprogs/attrdef.c168
-rwxr-xr-xntfsprogs/attrdef.h7
-rwxr-xr-xntfsprogs/boot.c268
-rwxr-xr-xntfsprogs/boot.h7
-rwxr-xr-xntfsprogs/cluster.c118
-rwxr-xr-xntfsprogs/cluster.h39
-rwxr-xr-xntfsprogs/list.h194
-rw-r--r--ntfsprogs/mkntfs.8290
-rwxr-xr-xntfsprogs/mkntfs.8.in290
-rwxr-xr-xntfsprogs/mkntfs.c5177
-rw-r--r--ntfsprogs/ntfscat.8136
-rwxr-xr-xntfsprogs/ntfscat.8.in136
-rwxr-xr-xntfsprogs/ntfscat.c440
-rwxr-xr-xntfsprogs/ntfscat.h46
-rwxr-xr-xntfsprogs/ntfsck.c883
-rw-r--r--ntfsprogs/ntfsclone.8391
-rwxr-xr-xntfsprogs/ntfsclone.8.in391
-rwxr-xr-xntfsprogs/ntfsclone.c2701
-rw-r--r--ntfsprogs/ntfscluster.8124
-rwxr-xr-xntfsprogs/ntfscluster.8.in124
-rwxr-xr-xntfsprogs/ntfscluster.c563
-rwxr-xr-xntfsprogs/ntfscluster.h63
-rw-r--r--ntfsprogs/ntfscmp.877
-rwxr-xr-xntfsprogs/ntfscmp.8.in77
-rwxr-xr-xntfsprogs/ntfscmp.c1012
-rw-r--r--ntfsprogs/ntfscp.8111
-rwxr-xr-xntfsprogs/ntfscp.8.in111
-rwxr-xr-xntfsprogs/ntfscp.c590
-rwxr-xr-xntfsprogs/ntfsdecrypt.c1436
-rwxr-xr-xntfsprogs/ntfsdump_logfile.c779
-rw-r--r--ntfsprogs/ntfsfix.881
-rwxr-xr-xntfsprogs/ntfsfix.8.in81
-rwxr-xr-xntfsprogs/ntfsfix.c1657
-rw-r--r--ntfsprogs/ntfsinfo.889
-rwxr-xr-xntfsprogs/ntfsinfo.8.in89
-rwxr-xr-xntfsprogs/ntfsinfo.c2384
-rw-r--r--ntfsprogs/ntfslabel.8118
-rwxr-xr-xntfsprogs/ntfslabel.8.in118
-rwxr-xr-xntfsprogs/ntfslabel.c458
-rw-r--r--ntfsprogs/ntfsls.8172
-rwxr-xr-xntfsprogs/ntfsls.8.in172
-rwxr-xr-xntfsprogs/ntfsls.c717
-rwxr-xr-xntfsprogs/ntfsmftalloc.c368
-rwxr-xr-xntfsprogs/ntfsmove.c923
-rwxr-xr-xntfsprogs/ntfsmove.h46
-rw-r--r--ntfsprogs/ntfsprogs.869
-rwxr-xr-xntfsprogs/ntfsprogs.8.in69
-rw-r--r--ntfsprogs/ntfsresize.8326
-rwxr-xr-xntfsprogs/ntfsresize.8.in326
-rwxr-xr-xntfsprogs/ntfsresize.c4497
-rwxr-xr-xntfsprogs/ntfstruncate.c809
-rw-r--r--ntfsprogs/ntfsundelete.8324
-rwxr-xr-xntfsprogs/ntfsundelete.8.in324
-rwxr-xr-xntfsprogs/ntfsundelete.c2490
-rwxr-xr-xntfsprogs/ntfsundelete.h112
-rwxr-xr-xntfsprogs/ntfswipe.c2131
-rwxr-xr-xntfsprogs/ntfswipe.h54
-rwxr-xr-xntfsprogs/sd.c607
-rwxr-xr-xntfsprogs/sd.h11
-rwxr-xr-xntfsprogs/utils.c1184
-rwxr-xr-xntfsprogs/utils.h137
-rwxr-xr-xprog.IAB1071
-rwxr-xr-xprog.IAD5
-rwxr-xr-xprog.IMB466
-rwxr-xr-xprog.IMD2
-rwxr-xr-xprog.PFI2
-rwxr-xr-xprog.PO1
-rwxr-xr-xprog.PR14
-rwxr-xr-xprog.PRI219
-rwxr-xr-xprog.PS979
-rwxr-xr-xprog.SearchResults3
-rwxr-xr-xprog.WK39
-rwxr-xr-xsrc/Makefile.am86
-rwxr-xr-xsrc/Makefile.in938
-rwxr-xr-xsrc/lowntfs-3g.c1538
-rw-r--r--src/ntfs-3g.8448
-rwxr-xr-xsrc/ntfs-3g.8.in217
-rwxr-xr-xsrc/ntfs-3g.c1357
-rw-r--r--src/ntfs-3g.probe.881
-rwxr-xr-xsrc/ntfs-3g.probe.8.in4
-rwxr-xr-xsrc/ntfs-3g.probe.c9
-rw-r--r--src/ntfs-3g.secaudit.8184
-rwxr-xr-xsrc/ntfs-3g.secaudit.8.in15
-rw-r--r--src/ntfs-3g.usermap.896
-rwxr-xr-xsrc/ntfs-3g_common.c745
-rwxr-xr-xsrc/ntfs-3g_common.h185
-rwxr-xr-xsrc/secaudit.c673
-rwxr-xr-xsrc/secaudit.h32
-rwxr-xr-xsrc/usermap.c3
-rw-r--r--[-rwxr-xr-x]stamp-h10
193 files changed, 80411 insertions, 44563 deletions
diff --git a/ntfsprogs/ntfsundelete.8 b/ntfsprogs/ntfsundelete.8
new file mode 100644
index 0000000..18de27f
--- a/dev/null
+++ b/ntfsprogs/ntfsundelete.8
@@ -0,0 +1,324 @@
+.\" Copyright (c) 2002\-2005 Richard Russon.
+.\" This file may be copied under the terms of the GNU Public License.
+.\"
+.TH NTFSUNDELETE 8 "November 2005" "ntfs-3g 2014.2.15"
+.SH NAME
+ntfsundelete \- recover a deleted file from an NTFS volume.
+.SH SYNOPSIS
+.B ntfsundelete
+[\fIoptions\fR] \fIdevice\fR
+.SH DESCRIPTION
+.B ntfsundelete
+has three modes of operation:
+.IR scan ,
+.I undelete
+and
+.IR copy .
+.SS Scan
+.PP
+The default mode,
+.I scan
+simply reads an NTFS Volume and looks for files that have been deleted. Then it
+will print a list giving the inode number, name and size.
+.SS Undelete
+.PP
+The
+.I undelete
+mode takes the files either matching the regular expression (option \-m)
+or specified by the inode\-expressions and recovers as much of the data
+as possible. It saves the result to another location. Partly for
+safety, but mostly because NTFS write support isn't finished.
+.SS Copy
+.PP
+This is a wizard's option. It will save a portion of the MFT to a file. This
+probably only be useful when debugging
+.I ntfsundelete
+.SS Notes
+.B ntfsundelete
+only ever
+.B reads
+from the NTFS Volume.
+.B ntfsundelete
+will never change the volume.
+.SH CAVEATS
+.SS Miracles
+.B ntfsundelete
+cannot perform the impossible.
+.PP
+When a file is deleted the MFT Record is marked as not in use and the bitmap
+representing the disk usage is updated. If the power isn't turned off
+immediately, the free space, where the file used to live, may become
+overwritten. Worse, the MFT Record may be reused for another file. If this
+happens it is impossible to tell where the file was on disk.
+.PP
+Even if all the clusters of a file are not in use, there is no guarantee that
+they haven't been overwritten by some short\-lived file.
+.SS Locale
+In NTFS all the filenames are stored as Unicode. They will be converted into
+the current locale for display by
+.BR ntfsundelete .
+The utility has successfully displayed some Chinese pictogram filenames and then
+correctly recovered them.
+.SS Extended MFT Records
+In rare circumstances, a single MFT Record will not be large enough to hold the
+metadata describing a file (a file would have to be in hundreds of fragments
+for this to happen). In these cases one MFT record may hold the filename, but
+another will hold the information about the data.
+.B ntfsundelete
+will not try and piece together such records. It will simply show unnamed files
+with data.
+.SS Compressed and Encrypted Files
+.B ntfsundelete
+cannot recover compressed or encrypted files. When scanning for them, it will
+display as being 0% recoverable.
+.SS The Recovered File's Size and Date
+To recover a file
+.B ntfsundelete
+has to read the file's metadata. Unfortunately, this isn't always intact.
+When a file is deleted, the metadata can be left in an inconsistent state. e.g.
+the file size may be zero; the dates of the file may be set to the time it was
+deleted, or random.
+.br
+To be safe
+.B ntfsundelete
+will pick the largest file size it finds and write that to disk. It will also
+try and set the file's date to the last modified date. This date may be the
+correct last modified date, or something unexpected.
+.SH OPTIONS
+Below is a summary of all the options that
+.B ntfsundelete
+accepts. Nearly all options have two equivalent names. The short name is
+preceded by
+.B \-
+and the long name is preceded by
+.BR \-\- .
+Any single letter options, that don't take an argument, can be combined into a
+single command, e.g.
+.B \-fv
+is equivalent to
+.BR "\-f \-v" .
+Long named options can be abbreviated to any unique prefix of their name.
+.TP
+\fB\-b\fR, \fB\-\-byte\fR NUM
+If any clusters of the file cannot be recovered, the missing parts will be
+filled with this byte. The default is zeros.
+.TP
+\fB\-C\fR, \fB\-\-case\fR
+When scanning an NTFS volume, any filename matching (using the
+.B \-\-match
+option) is case\-insensitive. This option makes the matching case\-sensitive.
+.TP
+\fB\-c\fR, \fB\-\-copy\fR RANGE
+This wizard's option will write a block of MFT FILE records to a file. The
+default file is
+.I mft
+which will be created in the current directory. This option can be combined
+with the
+.B \-\-output
+and
+.B \-\-destination
+options.
+.TP
+\fB\-d\fR, \fB\-\-destination\fR DIR
+This option controls where to put the output file of the
+.B \-\-undelete
+and
+.B \-\-copy
+options.
+.TP
+\fB\-f\fR, \fB\-\-force\fR
+This will override some sensible defaults, such as not overwriting an existing
+file. Use this option with caution.
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+Show a list of options with a brief description of each one.
+.TP
+\fB\-i\fR, \fB\-\-inodes\fR RANGE
+Recover the files with these inode numbers.
+.I RANGE
+can be a single inode number, several numbers separated by commas "," or a
+range separated by a dash "\-".
+.TP
+\fB\-m\fR, \fB\-\-match\fR PATTERN
+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
+.B \-\-case
+option.
+.TP
+\fB\-O\fR, \fB\-\-optimistic\fR
+Recover parts of the file even if they are currently marked as in use.
+.TP
+\fB\-o\fR, \fB\-\-output\fR FILE
+Use this option to set name of output file that
+.B \-\-undelete
+or
+.B \-\-copy
+will create.
+.TP
+\fB\-P\fR, \fB\-\-parent\fR
+Display the parent directory of a deleted file.
+.TP
+\fB\-p\fR, \fB\-\-percentage\fR NUM
+Filter the output of the
+.B \-\-scan
+option, by only matching files with a certain amount of recoverable content.
+.B Please read the caveats section for more details.
+.TP
+\fB\-q\fR, \fB\-\-quiet\fR
+Reduce the amount of output to a minimum. Naturally, it doesn't make sense to
+combine this option with
+.BR \-\-scan .
+.TP
+\fB\-s\fR, \fB\-\-scan\fR
+Search through an NTFS volume and print a list of files that could be recovered.
+This is the default action of
+.BR ntfsundelete .
+This list can be filtered by filename, size, percentage recoverable or last
+modification time, using the
+.BR \-\-match ,
+.BR \-\-size ,
+.B \-\-percent
+and
+.B \-\-time
+options, respectively.
+.sp
+The output of scan will be:
+.sp
+.nf
+Inode Flags %age Date Time Size Filename
+ 6038 FN.. 93% 2002\-07\-17 13:42 26629 thesis.doc
+.fi
+.TS
+box;
+lB lB
+l l.
+Flag Description
+F/D File/Directory
+N/R (Non\-)Resident data stream
+C/E Compressed/Encrypted data stream
+! Missing attributes
+.TE
+.sp
+.sp
+The percentage field shows how much of the file can potentially be recovered.
+.TP
+\fB\-S\fR, \fB\-\-size\fR RANGE
+Filter the output of the
+.B \-\-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.
+.TP
+\fB\-t\fR, \fB\-\-time\fR SINCE
+Filter the output of the
+.B \-\-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.
+.TP
+\fB\-T\fR, \fB\-\-truncate\fR
+If
+.B 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).
+.TP
+\fB\-u\fR, \fB\-\-undelete\fR
+Select
+.B undelete
+mode. You can specify the files to be recovered using by using
+.B \-\-match
+or
+.B \-\-inodes
+options. This option can be combined with
+.BR \-\-output ,
+.BR \-\-destination ,
+and
+.BR \-\-byte .
+.sp
+When the file is recovered it will be given its original name, unless the
+.B \-\-output
+option is used.
+.TP
+\fB\-v\fR, \fB\-\-verbose\fR
+Increase the amount of output that
+.B ntfsundelete
+prints.
+.TP
+\fB\-V\fR, \fB\-\-version\fR
+Show the version number, copyright and license for
+.BR ntfsundelete .
+.SH EXAMPLES
+Look for deleted files on /dev/hda1.
+.RS
+.sp
+.B ntfsundelete /dev/hda1
+.sp
+.RE
+Look for deleted documents on /dev/hda1.
+.RS
+.sp
+.B ntfsundelete /dev/hda1 \-s \-m '*.doc'
+.sp
+.RE
+Look for deleted files between 5000 and 6000000 bytes, with at least 90% of the
+data recoverable, on /dev/hda1.
+.RS
+.sp
+.B ntfsundelete /dev/hda1 \-S 5k\-6m \-p 90
+.sp
+.RE
+Look for deleted files altered in the last two days
+.RS
+.sp
+.B ntfsundelete /dev/hda1 \-t 2d
+.sp
+.RE
+Undelete inodes 2, 5 and 100 to 131 of device /dev/sda1
+.RS
+.sp
+.B ntfsundelete /dev/sda1 \-u \-i 2,5,100\-131
+.sp
+.RE
+Undelete inode number 3689, call the file 'work.doc', set it to recovered
+size and put it in the user's home directory.
+.RS
+.sp
+.B ntfsundelete /dev/hda1 \-u \-T \-i 3689 \-o work.doc \-d ~
+.sp
+.RE
+Save MFT Records 3689 to 3690 to a file 'debug'
+.RS
+.sp
+.B ntfsundelete /dev/hda1 \-c 3689\-3690 \-o debug
+.sp
+.RE
+.SH BUGS
+There are some small limitations to
+.BR ntfsundelete ,
+but currently no known bugs. If you find a bug please send an email describing
+the problem to the development team:
+.br
+.nh
+ntfs\-3g\-devel@lists.sf.net
+.hy
+.SH AUTHORS
+.B ntfsundelete
+was written by Richard Russon and Holger Ohmacht, with contributions from Anton
+Altaparmakov.
+It was ported to ntfs-3g by Erik Larsson and Jean-Pierre Andre.
+.SH AVAILABILITY
+.B ntfsundelete
+is part of the
+.B ntfs-3g
+package and is available from:
+.br
+.nh
+http://www.tuxera.com/community/
+.hy
+.SH SEE ALSO
+.BR ntfsinfo (8),
+.BR ntfsprogs (8)