Debian Codegraph @

upstream/debian-unstable/man1/truncate.1

raw
1 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.50.1.
2 .TH TRUNCATE "1" "February 2026" "GNU coreutils 9.10" "User Commands"
3 .SH NAME
4 truncate \- shrink or extend the size of a file to the specified size
5 .SH SYNOPSIS
6 .B truncate
7 \fI\,OPTION\/\fR... \fI\,FILE\/\fR...
8 .SH DESCRIPTION
9 .\" Add any additional description here
10 .PP
11 Shrink or extend the size of each FILE to the specified size
12 .PP
13 A FILE argument that does not exist is created.
14 .PP
15 If a FILE is larger than the specified size, the extra data is lost.
16 If a FILE is shorter, it is extended and the sparse extended part (hole)
17 reads as zero bytes.
18 .PP
19 Mandatory arguments to long options are mandatory for short options too.
20 .TP
21 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#truncate-c'\fB\-c, \-\-no\-create\fP\X'tty: link'
22 do not create any files
23 .TP
24 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#truncate-o'\fB\-o, \-\-io\-blocks\fP\X'tty: link'
25 treat SIZE as number of IO blocks instead of bytes
26 .TP
27 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#truncate-r'\fB\-r, \-\-reference=\,RFILE\fP\X'tty: link'\/\fR
28 base size on RFILE
29 .TP
30 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#truncate-s'\fB\-s, \-\-size=\,SIZE\fP\X'tty: link'\/\fR
31 set or adjust the file size by SIZE bytes
32 .TP
33 \X'tty: link https://www.gnu.org/software/coreutils/truncate#truncate--help'\fB\-\-help\fP\X'tty: link'
34 display this help and exit
35 .TP
36 \X'tty: link https://www.gnu.org/software/coreutils/truncate#truncate--version'\fB\-\-version\fP\X'tty: link'
37 output version information and exit
38 .PP
39 The SIZE argument is an integer and optional unit (example: 10K is 10*1024).
40 Units are K,M,G,T,P,E,Z,Y,R,Q (powers of 1024) or KB,MB,... (powers of 1000).
41 Binary prefixes can be used, too: KiB=K, MiB=M, and so on.
42 .PP
43 SIZE may also be prefixed by one of the following modifying characters:
44 \&'+' extend by, '\-' reduce by, '<' at most, '>' at least,
45 \&'/' round down to multiple of, '%' round up to multiple of.
46 .SH AUTHOR
47 Written by Padraig Brady.
48 .SH "REPORTING BUGS"
49 Report bugs to: bug\[email protected]
50 .br
51 GNU coreutils home page: <https://www.gnu.org/software/coreutils/>
52 .br
53 General help using GNU software: <https://www.gnu.org/gethelp/>
54 .br
55 Report any translation bugs to <https://translationproject.org/team/>
56 .SH "SEE ALSO"
57 \fBdd\fP(1), \fBtruncate\fP(2), \fBftruncate\fP(2)
58 .PP
59 .br
60 Full documentation <https://www.gnu.org/software/coreutils/truncate>
61 .br
62 or available locally via: info \(aq(coreutils) truncate invocation\(aq
63 .PP
64 .br
65 Packaged by Debian (9.10\-1)
66 .br
67 Copyright \(co 2026 Free Software Foundation, Inc.
68 .br
69 License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
70 .br
71 This is free software: you are free to change and redistribute it.
72 .br
73 There is NO WARRANTY, to the extent permitted by law.