Description
Merges several input log files into a single log file.
The command supports merging of the Security log files (*.log*.adtlog
Notes:
$FWDIR/log/fw.log$FWDIR/log/fw.logfw logswitch.$FWDIR/log/fw.adtlog$FWDIR/log/fw.adtlogfw logswitch.Syntax
| fw [-d] mergefiles [-s] [-r] [-t <Time Conversion File>] <Name of Log File 1> <Name of Log File 2> ... <Name of Log File N> <Name of Merged Log File> | 
The order of the parameters in the syntax is important. The name of the merged log file is always the last parameter.
Parameters
| Parameter | Description | 
|---|---|
| 
 | Runs the command in debug mode. Use only if you troubleshoot the command itself. | 
| 
 | Sorts the log entries in the merged log file by the time field. | 
| 
 | Removes duplicate entries from the merged log file. | 
| 
 | Specifies the file with time conversion information. This is required if you merge log files from Log Servers configured with different time zones. This information is used to adjust the time of log records from different time zones. The file format is as follows: 
 Notes: 
 | 
| 
 | Specifies the log files to merge. Notes: You must specify the absolute path and the name of the input log files. The name of the input log file cannot exceed 230 characters. | 
| 
 | Specifies the output merged log file. Notes: 
 | 
Example 1 - Merging Security log files
| [Expert@MGMT]# fw mergefiles -s -r $FWDIR/log/2018-06-06_000000.log $FWDIR/log/2018-06-05_000000.log /var/log/Merged_FireWall_Log.log [Expert@MGMT]# | 
Example 2 - Merging Audit log files
| [Expert@MGMT]# fw mergefiles -s -r $FWDIR/log/2018-06-06_000000.adtlog $FWDIR/log/2018-06-05_000000.adtlog /var/log/Merged_Audit_Log.adtlog [Expert@MGMT]# |