2014-04-13 09:45:15 -04:00
|
|
|
.TH TRUNCATE 1 ubase-VERSION
|
|
|
|
.SH NAME
|
|
|
|
\fBtruncate\fR - Shrink or extend the size of a file to the specified size
|
|
|
|
.SH SYNOPSIS
|
|
|
|
\fBtruncate\fR [\fB-c\fR] \fB-s\fI size file...\fR
|
|
|
|
.SH DESCRIPTION
|
|
|
|
\fBtruncate\fR shrinks or extends the size of each \fIfile\fR to the
|
|
|
|
specified size. A \fIfile\fR argument that does not exist is created.
|
|
|
|
If a \fIfile\fR is larger than the specified size, the extra data is lost.
|
|
|
|
If a \fIfile\fR is shorter, it is extended and the extended part (hole) reads
|
|
|
|
as zero bytes.
|
|
|
|
.SH OPTIONS
|
|
|
|
.TP
|
2014-04-13 11:40:40 -04:00
|
|
|
\fB-c\fR
|
|
|
|
Do not create any files.
|
2014-04-13 09:45:15 -04:00
|
|
|
.TP
|
2014-04-13 11:40:40 -04:00
|
|
|
\fB-s\fR
|
|
|
|
Set or adjust the file size by \fIsize\fR bytes.
|
2014-04-13 09:45:15 -04:00
|
|
|
.SH SEE ALSO
|
|
|
|
truncate(2), ftruncate(2)
|