MTRUNC(1)

NAME
mtrunc - truncate a log file

SYNOPSIS
mtrunc [-m MAX] [-t TRUNCTO] [-a ARCHIVE] [-c] FILE mtrunc --version
mtrunc --help

DESCRIPTION
mtrunc truncates the log file FILE if it is bigger than MAX bytes long (default is 100 kilobytes). Enough lines are left from the bottom of the file to leave it at most TRUNCTO bytes long (default 10 kilobytes). The message "(truncated)" is left at the top of FILE. If an ARCHIVE is specified, all data being removed from FILE is appended to ARCHIVE, with the exception of any "(truncated)" line inserted by a previous truncation. File locking is performed while truncation is being done to ensure that no data is lost.

OPTIONS

--maxsize, --max, -m MAXSIZE
    Truncate the file if it is larger than MAXSIZE bytes. MAXSIZE may optionally be followed by B, K, or M to denote bytes, kilobytes and megabytes respectively.

--truncto, --to, -t TRUNCTO
    When truncating, leave at most TRUNCTO bytes in the file, including the "(truncated)" message at the top. As with, MAXSIZE, TRUNCTO can be followed by any of B, K or M.

--archive, -a ARCHIVE
    Append any data to ARCHIVE before removing it from FILE. The default is to silently discard truncated data.

--commentfile, -c
    Treat the file as a comment file. That is, do not touch the header; everything up to and including the first line starting with `Message:' will be left as it is. Note that if no header can be found, the file is not truncated.

--help
    Print a usage message on standard output and exit successfully.

-V, --version
    Print version information on standard output and exit successfully.

AUTHOR
Andrew Wood <mconv@ivarch.com>
mconv: http://mconv.sourceforge.net/

SEE ALSO
mbbs(1), mgid(1), mte(1), mtime(1), mconv(1), mview(1)