Technology Insights

Exclude Multiple Directories When Creating A tar Archive

Earlier when upgrading a WordPress site that is running on a CentOS Linux server I needed to quickly backup the entire site to then perform an upgrade of the core WordPress installation. There are multiple directories located beneath the primary site folder that I didn’t need to backup including some caching directories as well as a database backup directory since all of those directories are not required to restore the site in case of an issue during the WP upgrade. Use the information below to create a tar archive while excluding multiple sub directories.

Details
Technology Insights

Find Out The Amount Of Time A Linux Process Has Been Running

I always forget the ps command arguments to see the length of time that a Linux process has been running so I am writing it out here in hopes of remembering it in the future without having to read the ps manpage. I also will know I can easily search this later to find the solution. Below I describe what command to use from a Linux terminal window to display the length of time a specific process or set of processes has been running.

Details
Technology Errors

CentOS Linux Parted Error: Unable to open /dev/sdc – unrecognised disk label

While rebuilding a large RAID 5 logical drive I had to use parted instead of fdisk. It has been awhile since I had to build a logical drive that was over 2TB so it had been quite awhile since I have used parted which will perform the same basic functions as fdisk and more. Anyhow when first attempting to use parted to create a partition table on the logical volume sitting on top of an Adaptec RAID card with multiple 2TB drives configured as RAID 5 on CentOS Linux I ran into an error. The resolution is easy but needed to note for myself as much as anything else.

Details
Code Snippets

Represent A Tab When Using sed Find/Replace

The other day I needed to create a RightScript shell script that would update a couple configuration files on a server that was being launched in the RackSpace Cloud via RightScale. I decided to use SED to find and replace content within the configuration files. The first pass at the script failed because what I thought were spaces ended up being tabs. Use the information below to represent a tab within a shell script when using sed.

Details
Technology Insights

Xbox 360 Transfer Account From Hard Drive To USB Flash Drive

Recently I have been using my Xbox 360 gamer profile a lot at my office to stream music using Zune. While I do have an Xbox 360 at my office and at my house it can be a pain because I have to lug the hard drive with my Microsoft Xbox 360 Gamer Profile on it back and forth between the two locations. Last week I ordered a 16GB USB flash drive to move my account onto so I would only have to take a USB stick with me when streaming music at locations that already had a Xbox 360 in place.

Details