Cisco Cisco Email Security Appliance C170 Referências técnicas

Página de 600
 
445
Cisco IronPort AsyncOS 7.6 CLI Reference Guide
 
Chapter 
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:
Table 3-148
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.
-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.
regex
Enter a regular expression.
Table 3-149
grep-Search for Text in a Log File
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' ()