Score:0

truncate syslog - is the info in that log lost irretrievably?

kp flag

I remember using this to get syslog emptied so I could view it more easily.

But does that mean than any errors, etc in syslog are irretrievably lost?

Thanks.

sudo truncate -s 0 /var/log/syslog
Score:1
cn flag

Yes, unless you have backups.

truncate's -s option is referring to size. So the size of the file was set to 0 bytes.

By default, Ubuntu will logrotate /var/log/syslog after it reaches a certain size. So perhaps the errors you're looking for are in syslog.1, syslog.2.gz, etc.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.