Linux : truncate file content

clear content file

cp /dev/null filename

truncate -s 0 filename

> filename

Advertisements