blob: e793f649526f1262544cbaf03e89c2b337a41ab9 [file] [log] [blame]
Steve Kondik79165c32015-11-09 19:43:00 -08001.\" Copyright (c) 2014 Jean-Pierre Andre
2.\" This file may be copied under the terms of the GNU Public License.
3.\"
4.TH NTFSTRUNCATE 8 "June 2014" "ntfs-3g @VERSION@"
5.SH NAME
6ntfstruncate \- truncate a file on an NTFS volume
7.SH SYNOPSIS
8\fBntfstruncate\fR [\fIoptions\fR] \fIdevice\fR \fIfile\fR \fI[attr-type\fR [\fIattr-name\fR]] \fInew-length\fR
9.SH DESCRIPTION
10.B ntfstruncate
11truncates (or extends) a specified attribute belonging to a
12file or directory, to a specified length.
13.SH OPTIONS
14Below is a summary of all the options that
15.B ntfstruncate
16accepts. Nearly all options have two equivalent names. The short name is
17preceded by
18.B \-
19and the long name is preceded by
20.BR \-\- .
21Any single letter options, that don't take an argument, can be combined into a
22single command, e.g.
23.B \-fv
24is equivalent to
25.BR "\-f \-v" .
26Long named options can be abbreviated to any unique prefix of their name.
27.TP
28\fB\-f\fR, \fB\-\-force\fR
29This will override some sensible defaults, such as not using a mounted volume.
30Use this option with caution.
31.TP
32\fB\-h\fR, \fB\-\-help\fR
33Show a list of options with a brief description of each one.
34.TP
35\fB\-l\fR
36Display licensing information.
37.TP
38\fB\-n\fR, \fB\-\-no-action\fR
39Simulate the truncation without actually write to device.
40.TP
41\fB\-q\fR, \fB\-\-quiet\fR
42Suppress some debug/warning/error messages.
43.TP
44\fB\-v\fR, \fB\-\-verbose\fR
45Display more debug/warning/error messages.
46.TP
47\fB\-V\fR, \fB\-\-version\fR
48Show the version number, copyright and license of
49.BR ntfstruncate .
50.TP
51\fBattr-type\fR
52Define a particular attribute type to be truncated (advanced use only).
53By default, the unnamed $DATA attribute (the contents of a plain file) will
54be truncated. The attribute has to be specified by a number in decimal
55or hexadecimal :
56.TS
57box;
58lB lB lB
59l l l.
60Hex Decimal Name
610x10 16 "$STANDARD_INFORMATION"
620x20 32 "$ATTRIBUTE_LIST"
630x30 48 "$FILE_NAME"
640x40 64 "$OBJECT_ID"
650x50 80 "$SECURITY_DESCRIPTOR"
660x60 96 "$VOLUME_NAME"
670x70 112 "$VOLUME_INFORMATION"
680x80 128 "$DATA"
690x90 144 "$INDEX_ROOT"
700xA0 160 "$INDEX_ALLOCATION"
710xB0 176 "$BITMAP"
720xC0 192 "$REPARSE_POINT"
730xD0 208 "$EA_INFORMATION"
740xE0 224 "$EA"
750xF0 240 "$PROPERTY_SET"
760x100 256 "$LOGGED_UTILITY_STREAM"
77.TE
78.sp
79.TP
80\fBattr-name\fR
81Define the name of the particular attribute type to be truncated
82(advanced use only).
83.sp
84.TP
85\fBnew-length\fR
86Specify the target size of the file.
87It will be rounded up to a multiple of the cluster size.
88A suffix of K, M, G, T, P or E may be appended to
89mean a multiplicative factor of a power of 1000. Similarly a suffix of
90Ki, Mi, Gi, Ti, Pi or Ei may be appended to mean a multiplicative factor
91of a power of 1024.
92.SH EXAMPLES
93Resize to 100MB the file database.db located in the Data directory
94which is at the root of an NTFS file system.
95.RS
96.sp
97.B ntfstruncate /dev/sda1 Data/database.db 100M
98.sp
99.RE
100.SH BUGS
101There are no known problems with
102.BR ntfstruncate .
103If you find a bug, please send an email
104describing the problem to the development team:
105.br
106.nh
107ntfs\-3g\-devel@lists.sf.net
108.hy
109.SH AUTHORS
110.B ntfstruncate
111was written by Anton Altaparmakov.
112.SH AVAILABILITY
113.B ntfstruncate
114is part of the
115.B ntfs-3g
116package and is available from:
117.br
118.nh
119http://www.tuxera.com/community/
120.hy
121.SH SEE ALSO
122.BR ntfs-3g (8),
123.BR ntfsfallocate (8),
124.BR ntfsprogs (8).