26.11.2012 Views

IronPort - CLI reference guide

IronPort - CLI reference guide

IronPort - CLI reference guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter<br />

Example of grep<br />

Use the following options when you run the grep command:<br />

Table 3-148 grep Command Options<br />

Option Description<br />

-C Provides lines of context around the grep<br />

pattern found. Enter a value to specify the<br />

number of lines to include.<br />

-e Enter a regular expression.<br />

-i Ignores case sensitivities.<br />

-p Paginates the output.<br />

-t Runs the grep command over the tail of the log<br />

file.<br />

regex Enter a regular expression.<br />

The following example shows a search for the text string ‘clean’ or ‘viral’ within<br />

the antivirus logs. The grep command includes a regex expression:<br />

Table 3-149 grep-Search for Text in a Log File<br />

mail3.example.com> grep "CLEAN\\|VIRAL" antivirus<br />

Fri Jun 9 21:50:25 2006 Info: sophos antivirus - MID 1 - Result 'CLEAN' ()<br />

Fri Jun 9 21:53:15 2006 Info: sophos antivirus - MID 2 - Result 'CLEAN' ()<br />

Fri Jun 9 22:47:41 2006 Info: sophos antivirus - MID 3 - Result 'CLEAN' ()<br />

Fri Jun 9 22:47:41 2006 Info: sophos antivirus - MID 4 - Result 'CLEAN' ()<br />

Fri Jun 9 22:47:41 2006 Info: sophos antivirus - MID 5 - Result 'CLEAN' ()<br />

Fri Jun 9 22:47:41 2006 Info: sophos antivirus - MID 6 - Result 'CLEAN' ()<br />

Fri Jun 9 22:47:42 2006 Info: sophos antivirus - MID 12 - Result 'CLEAN' ()<br />

Cisco <strong>IronPort</strong> AsyncOS 7.6 <strong>CLI</strong> Reference Guide<br />

445

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!