Cisco Cisco Email Security Appliance C650 Referencia técnica
3-230
CLI Reference Guide for AsyncOS 9.6 for Cisco Email Security Appliances
Chapter 3 The Commands: Reference Examples
Logging and Alerts
Use the following options when you run the
grep
command:
Example of grep
The following example shows a search for the text string ‘clean’ or ‘viral’ within the antivirus logs. The
grep command includes a regex expression:
grep command includes a regex expression:
mail3.example.com> grep "CLEAN\\|VIRAL" antivirus
Fri Jun 9 21:50:25 2006 Info: sophos antivirus - MID 1 - Result 'CLEAN' ()
Fri Jun 9 21:53:15 2006 Info: sophos antivirus - MID 2 - Result 'CLEAN' ()
Fri Jun 9 22:47:41 2006 Info: sophos antivirus - MID 3 - Result 'CLEAN' ()
Fri Jun 9 22:47:41 2006 Info: sophos antivirus - MID 4 - Result 'CLEAN' ()
Fri Jun 9 22:47:41 2006 Info: sophos antivirus - MID 5 - Result 'CLEAN' ()
Fri Jun 9 22:47:41 2006 Info: sophos antivirus - MID 6 - Result 'CLEAN' ()
Fri Jun 9 22:47:42 2006 Info: sophos antivirus - MID 12 - Result 'CLEAN' ()
Fri Jun 9 22:53:04 2006 Info: sophos antivirus - MID 18 - Result 'VIRAL' ()
Fri Jun 9 22:53:05 2006 Info: sophos antivirus - MID 16 - Result 'VIRAL' ()
Fri Jun 9 22:53:06 2006 Info: sophos antivirus - MID 19 - Result 'VIRAL' ()
Fri Jun 9 22:53:07 2006 Info: sophos antivirus - MID 21 - Result 'VIRAL' ()
Fri Jun 9 22:53:08 2006 Info: sophos antivirus - MID 20 - Result 'VIRAL' ()
Fri Jun 9 22:53:08 2006 Info: sophos antivirus - MID 22 - Result 'VIRAL' ()
mail3.example.com>
logconfig
Description
Configure access to log files.
Usage
Commit: This command requires a ‘commit’.
Cluster Management: This command can be used in all three machine modes (cluster, group, machine).
Batch Command: This command does not support a batch format.
Table 3-12
grep
Command Options
Option
Description
-C
Provides lines of context around the grep
pattern found. Enter a value to specify the
number of lines to include.
pattern found. Enter a value to specify the
number of lines to include.
-e
Enter a regular expression.
-i
Ignores case sensitivities.
-p
Paginates the output.
-t
Runs the grep command over the tail of the log
file.
file.
regex
Enter a regular expression.