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.

Of course writing shell code to check for the existence of a file is not 
difficult, but the people who wrote touch(1) seemed to think this is a good 
idea.



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

Reply via email to