I have mentioned this topic in an earlier post - zero'ing logfiles with cat /dev/null > logfile. But there is another easy way to zero a logfile in Bourne or Korn shell. It probably works in Bash and Zsh, too. I have to check. Here is an example below.
Note: I used the gts to represent the "greater than" or redirect symbol because blogger complained about using that particular character. Update: themadengineer reminded me on the use of "greater than" html syntax. Thanks.
Bourne Shell at the command prompt
# > mylogfile
or
Korn Shell at the command prompt
# > mylogfile
Earlier post: Don't remove those log files - zero them