EMPTY SYSLOG FILE ON LINUX


In some cases, it is necessary to empty a file without deleting it.
A typical case is to have a log file on the server, which has grown excessively and occupies a lot of disk space.

To empty the syslog file it can be done as follows:

sudo truncate -s 0 daemon.log.1

Need a Drupal Expert?

Senior Drupal developer, freelance, specialized in what's hardest: migrations, multilingual sites, SaaS platforms and Stripe integration. I leverage AI to cut delivery times and costs, with expert review on every line of code.

No agency, no middlemen. Direct contact with the one who does the work.