Archive Author: Josh

Having recently upgraded the Virtual Infrastructure at work to vSphere, I have encountered many scenarios with CentOS 5.3 guests not booting or taking a long time to boot. The last […]

READ MORE

One common scenario that I face in my daily work is to add disk to various filesystems. Setting up systems correctly so that this is possible will save time and […]

READ MORE

Fedora 12 – Disable mouse focus

By : -

One problem that I’ve had with Fedora 12 is that when enabling compliz the focus starts to follow the mouse pointer. This behavior is annoying to me as I don’t […]

READ MORE

I was auditing a set of mail servers at work the other day getting a list of all active user accounts and developed this little one liner: zgrep LOGIN /var/log/mail.log.[1-9].gz […]

READ MORE

I’m currently trying to prune a MyISAM table with 200 million rows down to 100 million rows. As part of this process, I am simply removing any orphaned records. This […]

READ MORE

Command line replace with perl

By : -

I often run into issues on the command line where I’d like to perform a non-greedy search and replace. This is not possible with sed, grep, or egrep, AFAIK, so […]

READ MORE

On busy sites the (internal dummy connection) message in apache logs can be a major annoyance as it fills the logs. A simple way to filter this out is to […]

READ MORE

I recently ran into an issue where I needed to decode some base64 text from the command line and used perl to manage the task: perl -MMIME::Base64 -ne ‘print decode_base64($_)’ […]

READ MORE

The following syntax can be used to remove a user from an OpenLDAP group: $ ldapmodify -x -D “cn=manager,dc=example,dc=com” -W <<EOF > dn: cn=sshusers,ou=groups,dc=example,dc=com > changetype: modify > delete: memberUid […]

READ MORE

Control characters require an escape sequence prior to using in a search and replace operation in VIM. In Linux, the escape character is Ctl-v. Windows requires a Ctl-q. Remove all […]

READ MORE