Truncate the Audit File

DESCRIPTION:

A utility that reduces the size of the audit file by removing the oldest part of the audit. It is run from the UNIX prompt.

USAGE:

Splus TRUNC_AUDIT  [size]

OPTIONAL ARGUMENTS:

size
desired maximum size (in number of characters) of the resulting audit file. The default is 100000.

SIDE EFFECTS:

part or all of the audit file is deleted.

WARNING:

The TRUNC_AUDIT utility cannot be run while S-PLUS is running, since S-PLUS normally has the audit file open for writing.

DETAILS:

The audit file is an ASCII file named .Audit in the working directory, to which the commands that you type to S-PLUS are added. Its pathname is returned by the function audit.file.

The TRUNC_AUDIT utility attempts to preserve the most recent size characters of the audit file. It does so by finding the first S-PLUS expression in the audit file that is within size characters of the end of file.

If there is a problem in truncating the audit file, a message is produced and the audit file is not changed. If you get a warning, it may be an indication that the audit file has been corrupted.

Whenever you exit S-PLUS, it checks the size of the audit file against the audit.size limit. If it is over the limit, a message is printed advising you to use the TRUNC_AUDIT utility. If your audit file contains important information, do not run TRUNC_AUDIT, but instead increase the audit.size option. Executing options(audit.size = n) will cause S-PLUS to use n as the audit file size limit.

To disable the addition of commands to the .Audit file, you can use the UNIX command chmod -w .Data/.Audit in the directory containing the .Data directory. This is useful, for example, when performing simulations. Auditing can be re-enabled with, for instance: chmod +w .Data/.Audit

SEE ALSO:

, , , AUDIT.

EXAMPLES:

Splus TRUNC_AUDIT 0   # empty the audit file