There are several ways empty the contents of files in Unix systems from the command line, Some of them are as follows:
# echo "" > file
# > file
# :> file
# cat /dev/null > file
# true > fichero
FUENTE: http://rm-rf.es/como-vaciar-ficheros-en-linux /