• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How Would I Contruct the Following On The CLI?

Netopia

Diamond Member
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
 
Thank you! It was the braces I needed to be reminded of!

The thing I hate about reading books on bash and csh is that I don't have tons of opportunity to apply the things I've read, so that by the time a need comes up, I can't remember!

Thanks again.

Joe
 
Back
Top