Russell Coker <[EMAIL PROTECTED]> wrote:
> On Monday 25 February 2008 22:11, Jim Meyering <[EMAIL PROTECTED]> wrote:
>> > One non-obvious feature request that I have is for a truncate on a
>> > non-existant file to create it (similar to the way "touch" is commonly
>> > used to create files).
>>
>> The obvious question is then "Why?"
>
> One specific case is where I want a large sparse file to exist - which may
> have been created previously.  So "truncate 2g /var/spool/whatever/foo" would
> make that file exist and be 2g in size regardless of whether it was there
> before.

If you don't mind truncating first, how about this?

    true > /var/spool/whatever/foo
    dd bs=1 seek=2G of=/var/spool/whatever/foo < /dev/null



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to