Steve Kondik | 79165c3 | 2015-11-09 19:43:00 -0800 | [diff] [blame] | 1 | .\" 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 |
| 6 | ntfstruncate \- 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 |
| 11 | truncates (or extends) a specified attribute belonging to a |
| 12 | file or directory, to a specified length. |
| 13 | .SH OPTIONS |
| 14 | Below is a summary of all the options that |
| 15 | .B ntfstruncate |
| 16 | accepts. Nearly all options have two equivalent names. The short name is |
| 17 | preceded by |
| 18 | .B \- |
| 19 | and the long name is preceded by |
| 20 | .BR \-\- . |
| 21 | Any single letter options, that don't take an argument, can be combined into a |
| 22 | single command, e.g. |
| 23 | .B \-fv |
| 24 | is equivalent to |
| 25 | .BR "\-f \-v" . |
| 26 | Long named options can be abbreviated to any unique prefix of their name. |
| 27 | .TP |
| 28 | \fB\-f\fR, \fB\-\-force\fR |
| 29 | This will override some sensible defaults, such as not using a mounted volume. |
| 30 | Use this option with caution. |
| 31 | .TP |
| 32 | \fB\-h\fR, \fB\-\-help\fR |
| 33 | Show a list of options with a brief description of each one. |
| 34 | .TP |
| 35 | \fB\-l\fR |
| 36 | Display licensing information. |
| 37 | .TP |
| 38 | \fB\-n\fR, \fB\-\-no-action\fR |
| 39 | Simulate the truncation without actually write to device. |
| 40 | .TP |
| 41 | \fB\-q\fR, \fB\-\-quiet\fR |
| 42 | Suppress some debug/warning/error messages. |
| 43 | .TP |
| 44 | \fB\-v\fR, \fB\-\-verbose\fR |
| 45 | Display more debug/warning/error messages. |
| 46 | .TP |
| 47 | \fB\-V\fR, \fB\-\-version\fR |
| 48 | Show the version number, copyright and license of |
| 49 | .BR ntfstruncate . |
| 50 | .TP |
| 51 | \fBattr-type\fR |
| 52 | Define a particular attribute type to be truncated (advanced use only). |
| 53 | By default, the unnamed $DATA attribute (the contents of a plain file) will |
| 54 | be truncated. The attribute has to be specified by a number in decimal |
| 55 | or hexadecimal : |
| 56 | .TS |
| 57 | box; |
| 58 | lB lB lB |
| 59 | l l l. |
| 60 | Hex Decimal Name |
| 61 | 0x10 16 "$STANDARD_INFORMATION" |
| 62 | 0x20 32 "$ATTRIBUTE_LIST" |
| 63 | 0x30 48 "$FILE_NAME" |
| 64 | 0x40 64 "$OBJECT_ID" |
| 65 | 0x50 80 "$SECURITY_DESCRIPTOR" |
| 66 | 0x60 96 "$VOLUME_NAME" |
| 67 | 0x70 112 "$VOLUME_INFORMATION" |
| 68 | 0x80 128 "$DATA" |
| 69 | 0x90 144 "$INDEX_ROOT" |
| 70 | 0xA0 160 "$INDEX_ALLOCATION" |
| 71 | 0xB0 176 "$BITMAP" |
| 72 | 0xC0 192 "$REPARSE_POINT" |
| 73 | 0xD0 208 "$EA_INFORMATION" |
| 74 | 0xE0 224 "$EA" |
| 75 | 0xF0 240 "$PROPERTY_SET" |
| 76 | 0x100 256 "$LOGGED_UTILITY_STREAM" |
| 77 | .TE |
| 78 | .sp |
| 79 | .TP |
| 80 | \fBattr-name\fR |
| 81 | Define the name of the particular attribute type to be truncated |
| 82 | (advanced use only). |
| 83 | .sp |
| 84 | .TP |
| 85 | \fBnew-length\fR |
| 86 | Specify the target size of the file. |
| 87 | It will be rounded up to a multiple of the cluster size. |
| 88 | A suffix of K, M, G, T, P or E may be appended to |
| 89 | mean a multiplicative factor of a power of 1000. Similarly a suffix of |
| 90 | Ki, Mi, Gi, Ti, Pi or Ei may be appended to mean a multiplicative factor |
| 91 | of a power of 1024. |
| 92 | .SH EXAMPLES |
| 93 | Resize to 100MB the file database.db located in the Data directory |
| 94 | which 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 |
| 101 | There are no known problems with |
| 102 | .BR ntfstruncate . |
| 103 | If you find a bug, please send an email |
| 104 | describing the problem to the development team: |
| 105 | .br |
| 106 | .nh |
| 107 | ntfs\-3g\-devel@lists.sf.net |
| 108 | .hy |
| 109 | .SH AUTHORS |
| 110 | .B ntfstruncate |
| 111 | was written by Anton Altaparmakov. |
| 112 | .SH AVAILABILITY |
| 113 | .B ntfstruncate |
| 114 | is part of the |
| 115 | .B ntfs-3g |
| 116 | package and is available from: |
| 117 | .br |
| 118 | .nh |
| 119 | http://www.tuxera.com/community/ |
| 120 | .hy |
| 121 | .SH SEE ALSO |
| 122 | .BR ntfs-3g (8), |
| 123 | .BR ntfsfallocate (8), |
| 124 | .BR ntfsprogs (8). |