Novell is now a part of Micro Focus

Tip: Searching through Log Files

Novell Cool Solutions: Tip
By Mike Murphy

Digg This - Slashdot This

Posted: 28 Apr 2005


Have you ever wanted to search through the BorderManager logs to find out who was surfing a site, or see what search terms they were using? I work in a school setting, and I came up with a solution for this. I use this solution to check for things such as who is surfing for anonymous proxies to bypass filtering, or surfing for "adult" items, etc. Looking through dozens of log files that are very large in size isn't typically easy or fast, but the following suggestion should help.


My solution uses some good old DOS commands from a cmd window. Here's what you need to do:

  1. Open a DOS window and surf to your log directory. I use a batchfile to map a drive to it.
  2. Issue the following command:

The FIND statement is case-sensitive, so you need to know what case the search item is in the log files. For example, on our network the student names are all CAPS, while the site names are lowercase.

%A is replaced with the variable name inside the parens ( ). In my example for log files from a particular day, you could change the wildcard to search more than 1 day if you wish.

Note: The double arrows (>>) are important to append to the output file, rather than overwrite the file.

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates