All apps/truncate

truncate

truncate

Shrinks or extends the size of files.

Runs as truncate|macOS, Linux, Windows

Command form

ai-draft · 2 tasks · 5 fields

Set or adjust file sizes. Shrinking a file discards the data past the new size.

Opens the form; the finished command lands at your prompt, unrun
otty gui truncate
Resize filesExample values, fixed in this page — nothing here reaches a terminal
Basic
Files*
file
Size*
string
Do not create files
--no-create
TasksEach one presets the form for one job
Set size
filessizeno_create
Match another file
filesreferenceno_create
ParametersOnly these flags are editable in the form
Files
path · positional 0 · repeatable
Size
Bytes, with optional suffix; a leading + or - adjusts instead of sets.
string
--size-s
Reference file
Base the size on this file.
path
--reference-r
Do not create files
boolean
--no-create-c
Size in IO blocks
boolean
--io-blocks-o
SourcesEvery flag above is checked against these
fig
completion

github.com

Before it fills your prompt, Otty checks the installed truncate against its version. A form that does not match your version is not offered.