Friday, May 04, 2012

A nice trick to truncate a file in linux

I alway use /dev/null to truncate a file. However, just found that you can use a simple command:
 :>filename
to truncate a file to zero size in linux.

Labels:

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home