I am redirecting bootup logs from multiple places to a text file.i use (>>) append while redirecting so that existing content would not be overwritten during successive logging. How can I make sure that file is overwritten and a clean state is provided during bootup?
I am redirecting bootup logs from multiple places to a text file.i use (
Share
As you say,
>>is for apending.Use
>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 "" > mylogfileto truncate it to an empty string.