truncate a 2gig file ?

Steven Farlie steven.farlie at
Wed Nov 27 15:48:31 EST 2002

On Wed, 2002-11-27 at 15:37, Simon Burton wrote:
> Also i have wanted to zero length a file in the past,
> ie. just keeping the filename....

In a shell you can just redirect from nothing into the file using '>':

> filename

That should zero the file. If filename doesn't exist, then it will
create a new file of zero length.
Linux: because it's free as in swatantryam

More information about the linux mailing list