how to clear log file in linux centos code example Example 1: bash command to empty textfile : > file.log Example 2: clear log file space linux find /var/log -type f -delete