man-pages/man1/truncate.1.html
2021-03-31 01:06:50 +01:00

112 lines
3.4 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of TRUNCATE</TITLE>
</HEAD><BODY>
<H1>TRUNCATE</H1>
Section: User Commands (1)<BR>Updated: September 2019<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
truncate - shrink or extend the size of a file to the specified size
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>truncate</B>
<I>,OPTION/</I>... <I>,FILE/</I>...
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<P>
Shrink or extend the size of each FILE to the specified size
<P>
A FILE argument that does not exist is created.
<P>
If a FILE is larger than the specified size, the extra data is lost.
If a FILE is shorter, it is extended and the extended part (hole)
reads as zero bytes.
<P>
Mandatory arguments to long options are mandatory for short options too.
<DL COMPACT>
<DT id="1"><B>-c</B>, <B>--no-create</B><DD>
do not create any files
<DT id="2"><B>-o</B>, <B>--io-blocks</B><DD>
treat SIZE as number of IO blocks instead of bytes
<DT id="3"><B>-r</B>, <B>--reference</B>=<I>,RFILE/</I><DD>
base size on RFILE
<DT id="4"><B>-s</B>, <B>--size</B>=<I>,SIZE/</I><DD>
set or adjust the file size by SIZE bytes
<DT id="5"><B>--help</B><DD>
display this help and exit
<DT id="6"><B>--version</B><DD>
output version information and exit
</DL>
<P>
The SIZE argument is an integer and optional unit (example: 10K is 10*1024).
Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,... (powers of 1000).
<P>
SIZE may also be prefixed by one of the following modifying characters:
'+' extend by, '-' reduce by, '&lt;' at most, '&gt;' at least,
'/' round down to multiple of, '%' round up to multiple of.
<A NAME="lbAE">&nbsp;</A>
<H2>AUTHOR</H2>
Written by Padraig Brady.
<A NAME="lbAF">&nbsp;</A>
<H2>REPORTING BUGS</H2>
GNU coreutils online help: &lt;<A HREF="https://www.gnu.org/software/coreutils/">https://www.gnu.org/software/coreutils/</A>&gt;
<BR>
Report truncate translation bugs to &lt;<A HREF="https://translationproject.org/team/">https://translationproject.org/team/</A>&gt;
<A NAME="lbAG">&nbsp;</A>
<H2>COPYRIGHT</H2>
Copyright &#169; 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &lt;<A HREF="https://gnu.org/licenses/gpl.html">https://gnu.org/licenses/gpl.html</A>&gt;.
<BR>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
<A NAME="lbAH">&nbsp;</A>
<H2>SEE ALSO</H2>
<A HREF="/cgi-bin/man/man2html?1+dd">dd</A>(1), <A HREF="/cgi-bin/man/man2html?2+truncate">truncate</A>(2), <A HREF="/cgi-bin/man/man2html?2+ftruncate">ftruncate</A>(2)
<P>
<BR>
Full documentation at: &lt;<A HREF="https://www.gnu.org/software/coreutils/truncate">https://www.gnu.org/software/coreutils/truncate</A>&gt;
<BR>
or available locally via: info '(coreutils) truncate invocation'
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="7"><A HREF="#lbAB">NAME</A><DD>
<DT id="8"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="9"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="10"><A HREF="#lbAE">AUTHOR</A><DD>
<DT id="11"><A HREF="#lbAF">REPORTING BUGS</A><DD>
<DT id="12"><A HREF="#lbAG">COPYRIGHT</A><DD>
<DT id="13"><A HREF="#lbAH">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:28 GMT, March 31, 2021
</BODY>
</HTML>