TRUNCATE(1)

πŸ“¦ version 0.12.0, in arch rolling

✨ 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-blocks is 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