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       The SIZE argument is an integer and  optional  unit  (example:  10K  is
41       10*1024).   Units  are  K,M,G,T,P,E,Z,Y  (powers  of 1024) or KB,MB,...
42       (powers 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

AUTHOR

49       Written by Padraig Brady.
50

REPORTING BUGS

52       GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
53       Report   truncate   translation   bugs   to    <https://translationpro
54       ject.org/team/>
55
57       Copyright  ©  2018  Free Software Foundation, Inc.  License GPLv3+: GNU
58       GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
59       This is free software: you are free  to  change  and  redistribute  it.
60       There is NO WARRANTY, to the extent permitted by law.
61

SEE ALSO

63       dd(1), truncate(2), ftruncate(2)
64
65       Full  documentation  at:  <https://www.gnu.org/software/coreutils/trun
66       cate>
67       or available locally via: info '(coreutils) truncate invocation'
68
69
70
71GNU coreutils 8.30                 July 2018                       TRUNCATE(1)
Impressum