Archive for 2009

RCS – The GNU Revision Control System.

Here is a copy of the original article I submitted to for publication in the magazine.

         RCS, or the GNU Revision Control System, is a system used to keep track of files that can be edited by many people, or for files that may need to be reverted back at some point in time. I’d like to concentrate on the latter, simply because I think it will actually pertain to more readers than the first reason might. If you have multiple people coding on a project, then you probably already know what a revision control system is, but if you don’t, read on, it’s much easier than it sounds I promise. I really love using Arch as a server distro. While many think it’s not up to the task, I think they are sadly mistaken, I think it’s a great server distro that is extremely flexible and easy to maintain. But I digress, that’s not what I wanted to talk about today. My point was that if you run a server, you make changes to configuration files quite often, and having a revision control system can come in quite handy. The reasons for using RCS are many, from keeping track of coding changes you make to your scripts and programs, to keeping track of changes to apache configuration files, to recipes for a dish that your trying to perfect. Regardless of the reason you may have for needing a revision control system, RCS should prove to be something worth your time to look into. It’s short learning curve and usefullness should be enough to tweak the interest of even the most reluctant users. I know it’s not always fun, but the old adage “Backup, backup, backup, backup.” has been ringing in my ears, and RCS proves to be just the tool for many of those backup jobs that sometimes might otherwise not get done. Using a revision control system does NOT have to be hard to do. It should be easy enough to become second nature and just natural to do in your day to day work. So, lets get started with this shall we ? First and formost, and perhaps the most complicated part j/k pacman -S rcs and the system installs RCS, so cool, so easy.

If we use the revision control system correctly, we should ensure two things.

1. We have a log of all change we have made to the file.

2. We can revert back to previous versions of the file with ease.

There are two main ways to use RCS.

1. Just use “co” and “ci” on files in any directory, there will be files created that match “file” but have a “,v” at the end of them. So you would have “file” and “file,v” in your directory.

2. Create a subdirectory named RCS in every directory you want to work in, and RCS will automatically store files there, and keep your work area clean. I prefer this method myself.

        You could get creative and create simlinks to ONE directory, but that’s outside the scope of this document, besides, having a RCS subdirectory in the directory your working in quickly lets you know that you should use RCS to edit these files. Create the RCS subdirectory with the command “mkdir RCS” anywhere you want to use RCS, see, I told you it’s not hard. Moving on…

       There are two commands that you will use the most. They aren’t hard to master at all. “ci” = check in, and “co” = check out. Pretty darn complicated so far isn’t it lol. Ok, lets see how we first start using RCS with a new file. Lets say we have a file we want revision control on. Lets call it “”. The very first thing we need to do is checking the file to RCS. Issue the command:

ci -u

       This will initialize the RCS version of the file. It will also ask you for a DESCRIPTION of the file. This is NOT a change log entry, it is for entering a description of the file. This can be a multiline description, when your done with that, put a single “.” (period) on one line and that finished the entry of the description. Woot!, you have now checked in your first file to RCS :) “Ok, now how do i check this bad boy out and make changes”, you ask. Glad you did, it’s just as easy. Now we want to check out and make some minor changes to it. So we need to issue the command:

co -l

       So, we now have checked out, so we can open it with our favorite text editor, and make any changes we want to. Then we save the file. This is the tricky part, the part AFTER you have saved the file, you must check the file back into RCS. This is where people drop the ball and forget to do the check in of the file. It’s really simple as well, in fact, we’ve already used the same command once before ! Now type in:

ci -u

       This immediately PROMPTS you for a change log entry. Again, this can span multiple lines if you need it to, just end the log entry with a . “period only” on a single line. For those of you that are like me, and will probably forget to check things back in, I wrote a quick script, called amazingly enough “RCSedit”. Okay, I actually hacked the thing from other examples I’ve seen, but I did cut it down quite a bit in the spirit of KISS. It’s very basic, but does the job very nicely. It will use whatever editor you tell it to, and it checks out the file using your editor, then once your done, it starts the check in procedure, so you never forget ! Nice eh, plus, you don’t even have to remember those command above, even though they were extremely simple.

——————— RCSedit Script ———————-

       This small script is used to open your default text editor, or nano if you don’t have a default editor set. Create an alias to it in your .bashrc, or put it in your PATH somewhere, and name it RCSedit. It then checks out the file, and when your done editing, it checks it back in for you, so you don’t accidentally forget that. (Trust me, it’s EASY to forget to check the files back in ! )

if [ ! "${EDITOR}" ]
/usr/bin/co -l $1
${EDITOR} $1
/usr/bin/ci -u $1


       Ok, so now we can initialize RCS by creating an RCS directory, we can initialize the file by running the check in command, we can check out the file and edit it, and finally check it back in. I sort of feel like hitting my red Staples button that says “That was easy”. :) So, what else do we need to do ? Here is a run down of commands that you might find useful. I highly suggest reading man pages for them to become familiar with all the options they have available. Below is a very basic set of commands that would probably do about 99% of what you might need to accomplish though.

mkdir RCS Create an RCS subdirectory for storing rcs initialized files.

ci -u filename Initialize the file

co -l filename Check out the file and lock it.

ci -u filename Check the file back in.

rlog filename Shows the long log of changes made to filename.

rcdiff filename Compares RCS revisions

rcs -u filename Overide a locked unchanged working file. In short, it “unlocks” the file. Use with care.

       Ok, so now we can do all sorts of stuff with RCS, but wait you say…. “How to I revert a file back to a previous version ?” GREAT QUESTION !!! It’s very easy as well. We don’t even need a new command we use some of the ones above, cool eh ? Lets say we have made several revisions to our script, but we decided the last changes just sucked bad, and we really just want to go back one revison to what was working before we fubared it. Not a problem. RCS to the rescue ! First, i’d use the rlog filename command to list all of my revisions, and revision numbers . Let us say my last revision was 1.2 and I want to go back to 1.1. it’s pretty easy really. Issue the commands:

rcs -u This unlocks our file.

co -l -r1.1 This checks out the revision number we want to use.

ci -u This checks in the current working version, which is 1.1.

       TaDa ! Version 1.1 is back in business !!! Play with this on some non-critical files, so you can see how this works. You can edit version 1.1, and it becomes 1.1.1, and you can also still edit version 1.2 and it becomes 1.2.1. Takes some getting used to, but you’ll soon get the hang of it, and be using revsion control, and wonder why you didn’t start doing this sooner. There you have it, the basics of RCS, see, it really was simple, and I hope it proves to be a useful tool for you, it has for me.

One final note, if you like use emacs, your in luck, emacs has built in support for RCS and other version control systems. ! :)


Looks like we had either an update failure, or a hardware failure. Everything is back to “normal” again. Ended up having to do a forced upgrade on mysql to get the site back up and running, so at this point, after some studying, I’m about 90% sure this was caused not by hardware, but by an interrupted update.

The bad part is, we did start out on faulty hardware, so that of course makes you nervous about everything else from then on. The hosting company has been great to do everything they can to help get the issue resolved, and has offered to come in late and pull the hard drive and test the hardware at some point, just to be sure.

This should basically serve as a reminder to all, export your data, there is a system in place for this, and I don’t have all my backup routines in place for the site yet………. so, it’s “User Beware” ;)
Do yourself a favor, and backup your work. I’ll get my mysql stuff in place eventually…. but for now, it’s on you to backup your own work.

I am currently working on the front page feeds as well…….. as you can probably already see :)

The ArchLinux Laptop Bag Arrives !

New Laptop bag !

The Arch Linux Laptop Bag Finally Arrives !

After what seemed like an eternity, the laptop bag I ordered finally arrives :)

The pictures don’t really do it justice, but I think it’s a very nice laptop bag. It is smaller than the one I have been using, but the compactness is actually a much needed relief for me. The bag I’ve been using was designed for up to a 17 inch laptop, mines 15.4, and while the specs for this bag stated it would hold up to a 17″ laptop, I really think you would be hard pressed to get it to fit.

I am now able to proudly display my favorite OS everywhere I go. Needless to say, it’s almost a “one of a kind”, as the sales of these were not quite what Dusty expected them to be. So, if you want a really nice laptop bag, you should really look at .
He has quite a selection available, and while it might take awhile to get it, it’s worth the wait :)

This is the link to the one I purchased: and that is shown in the pictures.

New Laptop bag !

About the only thing I thought might be wrong with it, was that the place that was designed to hold a water bottle was extremely small. I honestly don’t see how your going to squeeze a water bottle into that holder without ripping it apart, the elastic just won’t stretch that far. It’s either that or your drink half of it and squeeze the bottle to a fraction of it’s original diameter lol.

All in all, I couldn’t be happier. It’s a great looking bag, and I get to show off the new Arch Linux logo. Ok, so it’s not a new logo anymore, but hey, I still get to show it off ! :)
“The Director maximizes your momentum with a messenger bag that fits most 17″laptops. It keeps everything organized and leaves you free to maneuver with its Pullman handle attachment sleeve, business card pocket, organizer panel and handy airline ticket sleeve. Made from 600-denier poly/420- denier nylon.

Dimensions: 13.5″ x 22″ x 4″; 900 cubic inches. Price $80 + $15 USA shipping or $30 for Intl. shipping”

My desk – old picture.

This is a picture of my desk a couple years ago, it now has 2 22″ widescreen monitors, and nothing but ARCH ! :D
Basically it still look the same, except the four monitors have been replaced by two. I have 4 computers, one monitor for two computers.
I use two kvi switches to make that possible. All the computers are the same, IBM intellistations. 3.6 ghz machines with xeon processors, all running 64bit Arch Linux.
I’ll try to take some updated pics of the desk, perhaps once i clean it up again lol.
desk running with kernel26-2.6.30-5

The new kernel is out for Arch Linux, you can read more about it here.
The server is now running on kernel 2.6.30-5 ! :)

Continue reading ‘ running with kernel26-2.6.30-5’ »

Renewed / Extended domain registration.

$50 gets me 3 more years …. .me is expensive lol.

Renewed / Extended domain registration.

Domain Create Date:31-Mar-2009 04:31:26 UTC
Domain Last Updated Date:23-Jun-2009 23:25:58 UTC
Domain Expiration Date:31-Mar-2014 04:31:26 UTC

Site has been moved to the new server.

Finally, the site is on the new server, which hopefully will be rock solid for ever :)

Anyway, I finally opened up the blogs for new users, you know where to go to sign up……… get going ! :)

New server – an update.

meh, this is going slowly.

First we had the delay of getting a server built.   Then once it was built we had a massive segfault, that wasn’t recoverable (no, it wasn’t my fault :P  ).  Next we reloaded the OS from scratch and started over.  Eh…….. waddaya know, another segfault/crash.  New server time.  I have stressed tested the cpu and ran a bad blocks test on the hard drive, checked the ram configuration, i think we are golden now.
Continue reading ‘New server – an update.’ »

Server is setup, now to get it configured !

The new server is finally setup, now to get it configured.

Plenty of room, and plenty of ram, at least for  now.

ARCH LINUX – Machine Information Script ver .10

DATE: 06/09/09 01:43:05 PM   MACHINE NAME: Archie
ETHERNET CARD: Intel Corporation 82562EZ 10/100 Ethernet Controller (rev 02)
CPU INFO: Qty=1 i686 Intel(R) Celeron(R) CPU 1.80GHz
VIDEO CARD: Intel Corporation 82865G Integrated Graphics Controller (rev 02)
RAM INFO: 2058596 kB

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3             226G  752M  214G   1% /
UPTIME:  13:43:05 up 9 min,  1 user,  load average: 0.00, 0.07, 0.06
DAEMONS=(syslog-ng network netfs crond sshd)

Want an Arch Linux blog ?

Original post on

Want an Arch Linux blog ?

See for examples of what the blogs will look like :)  For about the last 3 weeks I have been testing out software for blogs, based on WordPress.  So far, things have went very well.
I am about ready to open things up to more users, if anyone is interested.  I have a few days before I will be able to setup new users, as I am currently in the process of moving the entire setup off my development server to it’s own server that has more bandwidth and bigger pipes.  Several nice add-ons include: Syntax highlighting using GeSHi, Twitter messages, updates, and more.
Continue reading ‘Want an Arch Linux blog ?’ »