Skip navigation.
Home

SysAdmin

Sysadmin Shell Joy: Renaming Archived logs to useful names

One of the things that (mildly) irritates me about sysadmining Unix boxes is the log rotation. ie /var/log/messages gets rotated to /var/log/messages.1 then finally /var/log/messages.2.gz.

So You Want to Learn Regular Expressions? Part 7: Examples: IP Addresses

The full list of Regular Expression Articles I've done:

In this article I'm going to take you a little through the method and madness of creating regular expressions for filtering or identifying IP Addresses and Ranges.

Why IP Addresses?

It will demonstrate and combine the concepts explored in previous articles. Hopefully cast some illumination on the method of solving Regular Expression problems, and highly coincidentally, show how to filter your corporate network from your Google Analytics stats.

So You Want to Learn Regular Expressions? Part 6: Errr... Or...

The full list of Regular Expression Articles I've done:

In the previous article with our box of chocolates, we used a method for choosing between one or more of several, more or less random, characters. [abc]+ for example.
But a common task in any web analytics is to be able to choose between several different items and treat them identically.
eg Images: gif, jpg, png
or, Pages: htm, html, cfm, php, asp and so on.

Or to put the first case pretty bluntly in English, we want "gif" or "jpg" or "png" at the end of a file name request.

So You Want to Learn Regular Expressions? Part 5: Just Like a Box of Chocolates

The full list of Regular Expression Articles I've done:

"Just Like a Box of Chocolates"?? Yeah. Pretty cool analogy isn't it! Just wait! Smile

I hope we're all familiar with the principle of being offered to pick a choccy from a box of Chocolates. Pick one and one only. But any one of the myriad of choices arrayed before you.

Well those clever Regular Expressions supply a tasty Box of Chocolates as well.

So You Want to Learn Regular Expressions? Part 4: More Wildcards

The full list of Regular Expression Articles I've done:

In this instalment of this series on Regular Expressions, I'll expose a wee lie from part 2, and show how wildcards can be less wild. More controlled. And hence more useful.

A LIE????

Urm. Yes. Not to put too fine a point on it. A school/teaching progression type of lie. You see a ".*" construct isn't actually a wildcard. The asterix is the wild card. All on its very own. Similarly the plus "+" in ".+".

So You Want to Learn Regular Expressions? Part 3: Positioning

The full list of Regular Expression Articles I've done:

If you've been tracking the public discussion on Robbin Steif's blog regarding this series, you'll no doubt be aware that she was prompting me (in a really unsubtle fashion ;-) ) to explain the use of the "beginning" and "end" characters. ^ and $ respectively.

So that's what this episode in the series will be focusing on.

So You Want to Learn Regular Expressions? Part 2: Wild Cards

The full list of Regular Expression Articles I've done:

In the previous article (So You Want to Learn Regular Expressions?) I hopefully managed to explain the underlying concept of using regular expressions via the Analogy of a jail.

In this article we'll start to explore the use of wild cards - what they are when to use them, and more importantly, when NOT to.

When NOT to use Wild Cards

When not to?

Yes. You see, a regular expression will usually have two implied wild cards.

So You Want to Learn Regular Expressions?

The full list of Regular Expression Articles I've done:

Perhaps you've been forcibly inducted into the Joy Of Regular Expressions through the use of tools like Google Analytics. Unfortunately while perfectly correct, the Google Analytics help for Regular Expressions is brief and does not explain the why of when to use X vs Y.
Hopefully the following article will get you through the why. I’m going to assume you’ve had at least some exposure to using Regular Expressions already.

On manually migrating a subversion repository to Launchpad/BZR

I'd migrated one of my projects here (AWFFull ) from subversion to a bazaar repository hosted on Launchpad some time ago.

Works well, but were a few  niggles and tricks in the process.

  • all the code imported  as 'steve' - which is accurate Laughing but a little deflating to ones ego.
  • imported some of my earlier faffing around with subversion - again isn't a problem per-se, but would have been nice to clean it away.

So when it came time to migrating DNSHistory , I figured I'd have a go at fixing these niggles. Herein are the steps used.

KDE konqueror - not showing image previews

One of those "blindingly obvious with hindsight" problems.

Problem: When browsing all our digitized images I noticed that many were not showing up as preview icons. Entire directories of images would have no previews, yet others would have 2 or 3 of 30+; others would have all.

Weird.

Google-Fu wasn't remotely successful. But did lead to the right place.

Konqueror ; Settings ; Configure Konqueror...

Scroll down to "Previews & MetaData"

Underneath the box of protocols to choose from "Select Protocols" is a horizontal slider.

"Maximum File Size". It's not obvious what this means or does from context or name. On my system that was having the issue, this was set to 1Mb. Increased to 5Mb and the problems went away.

Obviously, with the benefit of hindsight, what this actually means is the Maximum File Size to enable a preview to occur. Doh!

Syndicate content Syndicate content