GNU bug report logs - #6268
Suggestion: truncate should allow -r and -s options together

Previous Next

Package: coreutils;

Reported by: "Richard W.M. Jones" <rjones <at> redhat.com>

Date: Tue, 25 May 2010 15:42:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Voelker, Bernhard" <bernhard.voelker <at> siemens-enterprise.com>
To: Pádraig Brady <P <at> draigBrady.com>, Jim Meyering <jim <at> meyering.net>
Cc: "6268 <at> debbugs.gnu.org" <6268 <at> debbugs.gnu.org>
Subject: bug#6268: Suggestion: truncate should allow -r and -s options together
Date: Mon, 31 May 2010 08:31:49 +0200
Pádraig Brady wrote:
> Jim Meyering wrote:
>> what about --ref=non-regular-file ?

> Yes that's safer. st_size is only defined for regular files
> (or shared mem), so I'll only allow regular files.
> I'll push a separate patch soon.

what about --ref=- ?

one wants to have a file with the size
of a partition plus 5G, e.g.
	truncate --ref=/dev/sda5 -s +5G myfile
This will fail and will be rejected with such a patch.
So the user could use:
	truncate --ref=- -s +5G myfile < /dev/sda5

Just a thought ...

Have a nice day,
Berny






This bug report was last modified 14 years and 359 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.