I want to search through some log files.
The files are in /var/log
They rotate in the following manner:
mail.log
mail.log.1
mail.log.2
mail.log.3
...etc
I want to search through ONLY the first X number (let's say 3).
So, I would think that listing what I want to search through would be something like this:
/var/log/mail.log[!12]
so that it would only get the first log and then then next two. BUT... if I list it like that, it would seem that it wouldn't get the first log, since it doesn't have anything after the .log
How can I include BOTH .log AND .log.x ?
Joe
The files are in /var/log
They rotate in the following manner:
mail.log
mail.log.1
mail.log.2
mail.log.3
...etc
I want to search through ONLY the first X number (let's say 3).
So, I would think that listing what I want to search through would be something like this:
/var/log/mail.log[!12]
so that it would only get the first log and then then next two. BUT... if I list it like that, it would seem that it wouldn't get the first log, since it doesn't have anything after the .log
How can I include BOTH .log AND .log.x ?
Joe