Find utility

From Messaging Server Technical Reference Wiki
Jump to: navigation, search

Find specified version of an MTA log file.

Syntax

  imsimta find file-pattern
imsimta find Command Switches
Switch Default
-debug None
-f=offset-from-first None
-first=offset-from-first None
-l=offset-from-last None
-last=offset-from-last None

Restrictions

Must have read access to the requested file.

Parameters

file-pattern

A file name pattern for which MTA debug log file to find. If no directory is specified, the utility looks in the MTA log directory (imta_log). Note that the utility does not support relative directory specifications; when specifying a directory, use an absolute directory specification.

Description

The imsimta find utility may be used to find the precise file name of the specified "version" of an MTA debug log file. MTA debug log files have a -uniqueid appended to the file name to allow for the creation of multiple "versions" of the log file; on UNIX, the -uniqueid is appended to the very end of the file name (the end of the file extension). (See for instance the master_debug and slave_debug channel options, and the dispatcher.debugjob_controller.debug options.) The imsimta find utility understands these unique ids and can find the particular file name corresponding to the requested "version" of the file.

The default, if no offset switch is specified, is to find the most recent "version" of the file.

Switches

-debug

The -debug switch enables debug output.

-f=offset-from-first, -first=offset-from-first

The -f or -first switch is used to specify finding the nth "version" of the file (starting counting from 0). For instance, to find the earliest (oldest) "version" of the file, specify -f=0

-l=offset-from-last, -last=offset-from-last

The -l or -last switch is used to specify finding the nth from the last "version" of the file (starting decrementing from 0 as the most recent version). For instance, to find the most recent (newest) "version" of the file, specify -l=0

Examples


# imsimta find tcp_local_slave.log

The above UNIX command will print out the file name of the tcp_local_slave.log-uniqueid file most recently created in the MTA log directory.


# imsimta find tcp_local_master.log -f=0

The above UNIX command will display the file name of the oldest tcp_local_master.log-uniqueid file in the MTA log directory.


See also: