Archive for the ‘Articles’ Category

Script day: output the tail of a log based on time

Thursday, April 8th, 2010

As system administrators we often want to list the last few lines from a log file in order to track problems and see system reports. The UNIX command tail is very useful for that purpose and lets you display an arbitrary number of lines from the bottom of any file.

But often this is not really what you want – an administrator might want to see what happens in the last X minutes and the common practice to do this is to run tail with a guessed number of lines, see if you get what you want and if its not enough increase the number and try again.

Here’s another approach that works well if the log file you want to trace has time stamps for its lines (more…)

Firefox 3.6 automatic upgrade seems to be paying off

Sunday, March 21st, 2010

Mozilla’s decision to offer users of Firefox 3.5 to automatically upgrade to 3.6 seems to be paying off quite well:

From looking at some web statistics that I generated from leading web sites, this is how the browser market place looks for the top 95% of web users:

(more…)

How to build a chroot jail environment for CentOS

Sunday, March 14th, 2010

A chroot environment is simply a directory – inside which you can find a file system hierarchy exactly like your original operating system. You can then use the UNIX chroot command to open a shell in that directory so that command running under that shell see only the chroot environment and can’t mess up your system. This is very useful for many different reasons – for example if you want to build some software packages and you don’t want their build dependencies to pollute your real system.

Building a chroot environment is not difficult at all using the right tools, and YUM – the CentOS installation tool – has what you need.

(more…)

Another Mac-styled update for Ubuntu – Window buttons to the left!

Sunday, March 7th, 2010

As we’ve know for quite a long time now, Ubuntu is aiming to look and behave as much like Mac as possible(1) – we’ve already seen the Growl-like on screen notifications (which are rather cool) and here is the next major user interface change:

In Ubuntu 10.04 – due to be released on late April of this year – the window buttons (close, maximize,minimize) will be on the left side of the window! See here for the branding screenshots.

(more…)


  1. within 2 years Mark Shuttleworth said in 2008, so he’s clearly running out of time []

Upgrading CentOS 5 to Fedora 12

Friday, February 12th, 2010

Its time to update an old post about updates: Fedora 7 is again rather old, with the current Fedora being at 12, and 13 is right around the corner, but We’re still with CentOS 5 (I hear that RedHat is deep into beta with their next version – 6 but when it comes out is anyone’s guess).

In the mean time, if you want to run something a bit more modern maybe you’d want to upgrade your CentOS installation to Fedora 12 which can be considered pretty stable after a few months on the market. The reasons for the change may be numerous – maybe you need to run the latest subversion (with better merge tracking) or a new version of Ruby. Either way, if upgrading from CentOS 5 to Fedora 7 was a pain, guess how it is more the two years later?

Before we get to the action itself, I would be remiss if I would not recommend you to reconsider what you are about to do – this is a challenging exercise for many system admins and can sometimes end badly. I do not guarantee anything and if it breaks you get to keep both parts. Often its much faster and easier to just go to the server, stick a Fedora 12 DVD in the slot, reboot and let the DVD upgrade your system(1). That being said, this is fun if you’re into that sort of thing, so if you’re still with me, lets dive in!

(more…)


  1. another safer options would be to upgrade to Fedora 7 using the instruction in the previous article linked above, and then use Fedora’s preupgrade tool to upgrade to Fedora 8, then to fedora 10, and from there to Fedora 12, though this procedure will also require physical access to the machine and multiple reboots and multiple long downloads []

15 years in the making

Tuesday, February 9th, 2010

One of the most annoying issues with Linux’s graphical system (and any UN*X), is that if you have some keys setup for switching the keyboard layout – when using two or more keyboard layouts, such as for writing English and Hebrew – then that key combination cannot be used in any other keyboard shortcut.

Its most annoyingly present when setting the keyboard layout switching command to ALT+SHIFT (like in MS-Windows), then you can’t do any keyboard shortcut that has ALT+SHIFT in it – such as ALT+SHIFT+TAB to move to the previous window.

Well, finally there is a solution! As detailed in FreeDesktop.org’s Bugzilla and Ubuntu’s Launchpad , and thanks to Ilya Murav’jov we now have a patch to solve this ancient X11 problem.

(more…)

Script day: grep in jar (or zip) files

Monday, September 14th, 2009

Here is another script I wrote for work and I thought it will be interesting enough to share:

Say you want to check which JAR files (or ZIP files for that matter, as Java ARchive files are just ZIP files with a different extension) contain files that contain some text. grep is the obvious answer, but how to grep files in JARs?

(more…)

Why HTML access keys do not work in Firefox Linux

Wednesday, August 12th, 2009

Well, they don’t work for me – haven’t worked since Firefox 2, I think.

If you’re not sure what I’m talking about then its about the ability of web pages to define keyboard shortcuts to access and enable features on the web page using the keyboard instead of the mouse. Common actions are to focus text edit boxes or to trigger links directly.

(more…)

Script day – Shutting down multiple servers at once

Monday, July 20th, 2009

A system administrator in my company recently approached me with a problem – how to shutdown multiple Linux servers at the same time from a central location. Apparently this is something that people in the MS-Windows world use all kinds of applications, like the Remote Shutdown Tool from Microsoft (though I don’t understand how they handle the authentication – this tools doesn’t seem to require any authentication so it appears that any person with network access can shutdown any computer).

Anyway, apparently searching the web for “Linux remote shutdown” yields no useful results (or so I’ve been told), but frankly – when you have standard UN*X tools at your fingertips, a remote shutdown tool is simply typing ssh root@server shutdown -r now at your local console. But still, for people who want a “tool” – read on.

(more…)

More Internet Explorer Bugs

Monday, April 27th, 2009

[Update: initially I thought this problem was limited to IE7 and earlier, I was wrong and it also happens in Internet Explorer 8. Kind of destroys what ever expectations I've had remaining for IE8]

Although Internet Explorer 8 was already released(1) most users are going to stick to previous versions – I know this for a fact as even though Internet Explorer 7 is already more than a couple of years on the market it still only has slightly better then 50% of the Internet Explorer market (not including other browsers).

That being said, its always “fun” finding more Internet Explorer bugs, something which the web developer I’m working with is proficient in (which she isn’t really doing on purpose – I’m not sure if it counts in her favor or not :-) ), so here is the latest one she stumbled upon(2): (more…)


  1. and it boasts a superior rendering engine – which is almost on par with  Firefox 3: it breaks horribly in the WordPress edit post dialog – its the first serious rendering problem I’ve seen with IE8 []
  2. I haven’t documented the several previous ones we encountered – I might do so in the future []