Search notes:

Shell command: truncate

truncate resizes a file to a given size.

Options

-c --no-create Do not create any files
-o --io-blocks Treat SIZE as number of IO blocks instead of bytes.
-r --reference =FILE resize to size of FILE
-s --size =SIZE Resize to SIZE.

SIZE

SIZE can be prefixed with
+, - Relative resizing (i. e. extend by or shrink by)
<, > At most, at least
/, % round down/up to multiple of
SIZE can be suffixed with the standard suffixes KB, K, MB, MYB and Y

See also

Shell commands such as dd or touch

Index