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
Tags

Have Any Project in Mind?

If you want to automate your business or do something with Drupal, let's talk.

AI automation, consulting, development or Drupal website maintenance.