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