diff options
| author | Soccera1 <[email protected]> | 2026-07-28 16:08:14 +1000 |
|---|---|---|
| committer | Soccera1 <[email protected]> | 2026-07-28 16:08:48 +1000 |
| commit | 9846f087eb28bf11df740675ef487657ded39b69 (patch) | |
| tree | e91dbd19b524f9432da6bcb86b1fc193e0d02e26 /man/truncate.1 | |
| parent | 7fa396c9ef22b32a0b05e94aaa0266dd3e7515f8 (diff) | |
| parent | 6a2f098e72e71437154ec00506e8e736aa8e1026 (diff) | |
| download | bnu-9846f087eb28bf11df740675ef487657ded39b69.tar.gz bnu-9846f087eb28bf11df740675ef487657ded39b69.zip | |
Merge branch 'master' into refactor/single-call-commandsrefactor/single-call-commands
# Conflicts:
# README.md
Diffstat (limited to 'man/truncate.1')
| -rw-r--r-- | man/truncate.1 | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/man/truncate.1 b/man/truncate.1 new file mode 100644 index 0000000..b6fc045 --- /dev/null +++ b/man/truncate.1 @@ -0,0 +1,71 @@ +.\" Adapted for BNU from the GNU Coreutils 9.11 manual page; see doc/README.md. +.TH TRUNCATE "1" "2026-07-28" "BNU 9.11" "BNU Commands" +.SH NAME +truncate \- shrink or extend the size of a file to the specified size +.SH SYNOPSIS +.B truncate +\fI\,OPTION\/\fR... \fI\,FILE\/\fR... +.SH DESCRIPTION +.\" This page is derived from GNU Coreutils documentation. +This page documents BNU, an independent Bun implementation compatible with +GNU Coreutils 9.11. +.PP +Shrink or extend the size of each FILE to the specified size +.PP +A FILE argument that does not exist is created. +.PP +If a FILE is larger than the specified size, the extra data is lost. +If a FILE is shorter, it is extended and the sparse extended part (hole) +reads as zero bytes. +.PP +Mandatory arguments to long options are mandatory for short options too. +.TP +\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#truncate-c'\fB\-c, \-\-no\-create\fP\X'tty: link' +do not create any files +.TP +\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#truncate-o'\fB\-o, \-\-io\-blocks\fP\X'tty: link' +treat SIZE as number of IO blocks instead of bytes +.TP +\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#truncate-r'\fB\-r, \-\-reference=\,RFILE\fP\X'tty: link'\/\fR +base size on RFILE +.TP +\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#truncate-s'\fB\-s, \-\-size=\,SIZE\fP\X'tty: link'\/\fR +set or adjust the file size by SIZE bytes +.TP +\X'tty: link https://www.gnu.org/software/coreutils/truncate#truncate--help'\fB\-\-help\fP\X'tty: link' +display this help and exit +.TP +\X'tty: link https://www.gnu.org/software/coreutils/truncate#truncate--version'\fB\-\-version\fP\X'tty: link' +output version information and exit +.PP +The SIZE argument is an integer and optional unit (example: 10K is 10*1024). +Units are K,M,G,T,P,E,Z,Y,R,Q (powers of 1024) or KB,MB,... (powers of 1000). +Binary prefixes can be used, too: KiB=K, MiB=M, and so on. +.PP +SIZE may also be prefixed by one of the following modifying characters: +\&'+' extend by, '\-' reduce by, '<' at most, '>' at least, +\&'/' round down to multiple of, '%' round up to multiple of. +.SH AUTHORS +Upstream GNU Coreutils documentation authors: +Written by Padraig Brady. +.br +Adapted for BNU; the BNU implementation is independent. +.SH "REPORTING BUGS" +Report BNU bugs at <https://github.com/Soccera1/bnu/issues>. +.br +For upstream GNU Coreutils, see <https://www.gnu.org/software/coreutils/>. +.SH COPYRIGHT +Copyright \(co 2026 Free Software Foundation, Inc. +.br +This manual page was adapted for BNU in 2026. +License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. +.br +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. +.SH "SEE ALSO" +\fBdd\fP(1), \fBtruncate\fP(2), \fBftruncate\fP(2) +.PP +.br +Upstream documentation <https://www.gnu.org/software/coreutils/truncate> +.br +BNU documentation is available locally via: info \(aq(bnu) truncate invocation\(aq |
