The parameters maxfiles (default: 10 files) and maxfilesize (default: 10 MB) in the [trace] section of global.ini or a specific service control the trace file rotation. SAP HANA writes the files on a rotation basis and switches to the next file whenever the current file reached the maxfilesize limit.
The parameter global.ini --> [trace] --> maxalertfilesize defines the maximum size of alert files (default: 50 MB). When the configured size is reached, the file is compressed (including a timestamp in its name) and a new file is written from scratch.
Avoid increasing these settings unless there is a specific need. Otherwise more and / or larger files are kept for a longer time.
On operating system level you can manually delete files if required.
From SAP HANA side you can purge SAP HANA logs and traces using
ALTER SYSTEM REMOVE TRACES ...
ALTER SYSTEM CLEAR TRACES ...
SQL: "HANA_TraceFiles_Overview" (SAP Note 1969700) can be used to show files exceeding a defined retention time and generate the related cleanup commands.