To clear a log file and retain the file permissions:
Copy the file to a new filename.
cp /usr/adm/messages /usr/adm/messages.old
Clear the file with one of these commands:
Bourne or Korn shell:
cat /dev/null > /usr/adm/messages
To monitor new information that is currently being
appended to system log files, enter:
tail -f /usr/adm/messages
The -f (follow) option to the
command prints the last 10 lines of the file, followed by
any lines that are appended to the file between the time
you initiated and stopped (with <Del>) the tail command.