1TRUNCATE(1)                      User Commands                     TRUNCATE(1)
2
3
4

NAME

6       truncate - shrink or extend the size of a file to the specified size
7

SYNOPSIS

9       truncate OPTION... FILE...
10

DESCRIPTION

12       Shrink or extend the size of each FILE to the specified size
13
14       A FILE argument that does not exist is created.
15
16       If  a  FILE  is larger than the specified size, the extra data is lost.
17       If a FILE is shorter, it is extended and the extended part (hole) reads
18       as zero bytes.
19
20       Mandatory  arguments  to  long  options are mandatory for short options
21       too.
22
23       -c, --no-create
24              do not create any files
25
26       -o, --io-blocks
27              treat SIZE as number of IO blocks instead of bytes
28
29       -r, --reference=RFILE
30              base size on RFILE
31
32       -s, --size=SIZE
33              set or adjust the file size by SIZE bytes
34
35       --help display this help and exit
36
37       --version
38              output version information and exit
39
40       SIZE is an integer and optional unit (example:  10M  is  10*1024*1024).
41       Units  are K, M, G, T, P, E, Z, Y (powers of 1024) or KB, MB, ... (pow‐
42       ers of 1000).
43
44       SIZE may also be prefixed by one of the following modifying characters:
45       '+' extend by, '-' reduce by, '<' at most, '>' at least, '/' round down
46       to multiple of, '%' round up to multiple of.
47
48       GNU  coreutils  online  help:  <http://www.gnu.org/software/coreutils/>
49       Report    truncate    translation   bugs   to   <http://translationpro
50       ject.org/team/>
51

AUTHOR

53       Written by Padraig Brady.
54
56       Copyright © 2013 Free Software Foundation, Inc.   License  GPLv3+:  GNU
57       GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
58       This  is  free  software:  you  are free to change and redistribute it.
59       There is NO WARRANTY, to the extent permitted by law.
60

SEE ALSO

62       dd(1), truncate(2), ftruncate(2)
63
64       The full documentation for truncate is maintained as a Texinfo  manual.
65       If  the info and truncate programs are properly installed at your site,
66       the command
67
68              info coreutils 'truncate invocation'
69
70       should give you access to the complete manual.
71
72
73
74GNU coreutils 8.22               October 2018                      TRUNCATE(1)
Impressum