TRUNCATE(1)
β¨ TRUNCATE(1) β¨
okay so bestie, welcome to the truncate page from your General Commands Manual β yes that's the manual name, we're being official today π
β and honestly? this lil command is giving main character energy for your files. let's get into it π«Ά
πΈ NAME πΈ
truncate β shrink or extend the size of each file to the specified size. no cap, that's literally the whole job π
π SYNOPSIS π
truncate [OPTION]... [FILE]...
π¦ DESCRIPTION π¦
Shrink or extend the size of each file to the specified size. that's it, that's the vibe β¨ like it will literally make your file bigger or smaller on purpose, which is lowkey iconic and also slightly terrifying π
π₯ OPTIONS π₯
-o,--io-blocksβ treat SIZE as the number of I/O blocks of the file rather than bytes. blocks not bytes, bestie, keep up π-c,--no-createβ do not create files that do not exist. like, if it's not there, we're not manifesting it π-r,--reference <RFILE>β base the size of each file on the size of RFILE. copy the vibe (the size) of another file, slay π-s,--size <SIZE>β set or adjust the size of each file according to SIZE, which is in bytes unless--io-blocksis specified. this is the one you'll actually be using fr fr-h,--helpβ Print help. our emotional support flag π«Ά-V,--versionβ Print version. for the girlies who need to know exactly what they're running β<FILE>β the file(s)!! the actual victims of the resize π
π EXTRA π
okay this is the part where it gets β¨spicyβ¨ so pay attention.
SIZE is an integer with an optional prefix and optional unit. the available units (K, M, G, T, P, E, Z, and Y) use the following format:
'KB' => 1000 (kilobytes)
'K' => 1024 (kibibytes)
'MB' => 1000*1000 (megabytes)
'M' => 1024*1024 (mebibytes)
'GB' => 1000*1000*1000 (gigabytes)
'G' => 1024*1024*1024 (gibibytes)
see the pattern?? one letter = the 1024 one, two letters = the 1000 one. the way that K and KB are different and nobody told you π it's giving "read the docs before you nuke your disk" π
SIZE may also be prefixed by one of the following to adjust the size of each file based on its current size:
'+' => extend by
'-' => reduce by
'<' => at most
'>' => at least
'/' => round down to multiple of
'%' => round up to multiple of
so +, -, <, >, /, % β six lil gremlins that decide how your size gets applied π§ lowkey obsessed with / and % ngl, rounding is so satisfying.
bestie warning from your girl: these are literal size changes to literal files.-reduces.+extends. there is no undo button and no "are you sure?" prompt. do a vibe check before you commit π
β VERSION β
v(uutils coreutils) 0.12.0
and that's the whole page, bestie!! π sign-off time: this gem is from v(uutils coreutils) 0.12.0, dated 2026-09-17 β go shrink something responsibly, ily, bye ππ¦
π¦ where this page comes from
- arch rolling: uutils-coreutils 0.12.0-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms