I am redirecting bootup logs from multiple places to a text file.i use (
As you say,
>> is for apending.
> to overwrite the file with the new content.
If you want to simply clear the log file before you start appending to it, use
echo "" > mylogfile to truncate it to an empty string.