From 81b7585ad19e1ee0a1a43dda44dd21f11bfd6e86 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Wed, 26 May 2010 09:27:53 +0100 Subject: truncate: support sizes relative to an existing file * doc/coreutils.texi (truncate invocation): Mention that --reference bases the --size rather than just setting it. * src/truncate.c (usage): Likewise. Also remove the clause describing --size and --reference as being mutually exclusive. (do_truncate): Add an extra parameter to hold the size of a referenced file, and use it if positive. (main): Pass the size of a referenced file to do_truncate(). * tests/misc/truncate-parameters: Adjust for the new combinations. * NEWS: Mention the change Suggested by Richard W.M. Jones --- doc/coreutils.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 115e5fb49..d1c308524 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -10767,13 +10767,13 @@ Treat @var{size} as number of I/O blocks of the @var{file} rather than bytes. @itemx --reference=@var{rfile} @opindex -r @opindex --reference -Set the size of each @var{file} to the same size as @var{rfile}. +Base the size of each @var{file} on the size of @var{rfile}. @item -s @var{size} @itemx --size=@var{size} @opindex -s @opindex --size -Set the size of each @var{file} to this @var{size}. +Set or adjust the size of each @var{file} according to @var{size}. @multiplierSuffixesNoBlocks{size} @var{size} may also be prefixed by one of the following to adjust -- cgit v1.2.3-70-g09d2