NTFSTRUNCATE(8)
๐ฆ NTFSTRUNCATE โ okay bestie, let's talk about ntfstruncate (that's section 8 of the System Manager's Manual, iykyk) โจ
๐ NAME
ntfstruncate โ truncate a file on an NTFS volume. That's the whole vibe. It truncates. A file. On NTFS. Slay.
๐ธ SYNOPSIS
ntfstruncate [options] device file [attr-type [attr-name]] new-length
๐ DESCRIPTION
So ntfstruncate truncates (or extends โ yes, both, it's flexible like that ๐) a specified attribute belonging to a file or directory, to a specified length. That's it. That's the whole function. Main character energy honestly.
โจ OPTIONS โจ
Okay so here's every single option ntfstruncate accepts, and I do mean every single one, because we don't skip. Nearly all of these have two equivalent names โ short name gets a - in front, long name gets --. And a heads-up: any single-letter options that don't take an argument can be smooshed together into one command, like -fv is literally the same thing as -f -v. Long named options can be abbreviated to any unique prefix of their name. Cute, right? ๐ซถ
-f,--forceโ overrides some sensible defaults, like the whole "not using a mounted volume" thing. โ ๏ธ Use this one with caution, bestie, it's giving reckless.-h,--helpโ shows you the list of options with a lil brief description of each. Your safe space.-lโ displays licensing information. Legal era.-n,--no-actionโ simulates the truncation without actually writing to the device. Dress rehearsal, no commitment ๐-q,--quietโ suppresses some debug/warning/error messages. Shhh ๐คซ-v,--verboseโ displays MORE debug/warning/error messages. Not me wanting all the tea ๐-V,--versionโ shows the version number, copyright and license ofntfstruncate. Receipts! ๐งพ
๐ the positional ones (still iconic, still listed)
attr-typeโ defines a particular attribute type to be truncated. Advanced use only, fr fr. By default, the unnamed$DATAattribute (like, the contents of a plain file) is what gets truncated. The attribute has to be specified by a number in decimal or hexadecimal:
Hex Decimal Name
0x10 16 "$STANDARD_INFORMATION"
0x20 32 "$ATTRIBUTE_LIST"
0x30 48 "$FILE_NAME"
0x40 64 "$OBJECT_ID"
0x50 80 "$SECURITY_DESCRIPTOR"
0x60 96 "$VOLUME_NAME"
0x70 112 "$VOLUME_INFORMATION"
0x80 128 "$DATA"
0x90 144 "$INDEX_ROOT"
0xA0 160 "$INDEX_ALLOCATION"
0xB0 176 "$BITMAP"
0xC0 192 "$REPARSE_POINT"
0xD0 208 "$EA_INFORMATION"
0xE0 224 "$EA"
0xF0 240 "$PROPERTY_SET"
0x100 256 "$LOGGED_UTILITY_STREAM"
attr-nameโ defines the name of the particular attribute type to be truncated. Again: advanced use only. You've been warned ๐new-lengthโ specifies the target size of the file. Heads up, it gets rounded up to a multiple of the cluster size. And the suffixes? Obsessed. A suffix ofK,M,G,T,PorEcan be appended to mean a multiplicative factor of a power of 1000. Similarly a suffix ofKi,Mi,Gi,Ti,PiorEican be appended to mean a multiplicative factor of a power of 1024. Two different systems, both valid, pick your fighter ๐ฅ
๐ EXAMPLES
Resize to 100MB the file database.db located in the Data directory which is at the root of an NTFS file system. Look at her go:
ntfstruncate /dev/sda1 Data/database.db 100M
Ate. No crumbs. ๐
๐ BUGS
There are no known problems with ntfstruncate. Genuinely flawless, we love to see it. But if you do find a bug, please send an email describing the problem to the development team:
ntfs-3g-devel@lists.sf.net
They wanna know. Communicate. ๐ซถ
๐ AUTHORS
ntfstruncate was written by Anton Altaparmakov. Legend behaviour. ๐
๐ฆ AVAILABILITY
ntfstruncate is part of the ntfs-3g package and is available from:
https://github.com/tuxera/ntfs-3g/wiki/
Go get her โญ
๐ SEE ALSO
ntfs-3g(8), ntfsfallocate(8), ntfsprogs(8). The whole friend group ๐
okay that's the whole page, you're so welcome ๐ this is ntfs-3g 2026.9.28, dated June 2014 โ yes she's been around, she's a legacy icon and she still serves ๐ bye bestie, go truncate responsibly โจ
๐ฆ where this page comes from
- arch rolling: ntfsprogs 2026.9.28-1 ยท GPL-2.0-or-later
- nixpkgs unstable: ntfs3g 2026.9.28
- Copyright (c) 2014 Jean-Pierre Andre
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms