Here is the fastest way to truncate a file to zero
bytes in a bourne or korn shell.
$ > /var/log/messages
This is a good method, if the file has to be truncated,
but is opened by another process. For example, if you
want to truncate /var/log/messages, which is held
open by syslogd...
This tip generously supported by: ulli@ucrc.org NOTE: All tips provided are USE AT YOUR OWN RISK. Tips are submitted
by various unix admins around the globe. UGU suggest you read and
test each tip in a non-volitile environment before placing into
production.