Where’s FireFox 3.0?

Well, I woke up today and I remembered that today is “Download Day”  but wait…. spreadfirefox.com is still the same… where’s my FireFox? Here’s what they have to say:


Check out the Mozilla wiki that tracks their process.

Linux SysAdmin Toolbox

imageWorking with Linux over the years has really exposed me to many useful and unique tools. I’ll show you a few of the tools that help me get through my day a bit quicker and more efficiently. 

Moving/Grabbing FIles

Getting files to your Linux system can be easily achieved using the tools below.


The wget command allows you to retrieve files from an FTP/HTTP or HTTPs source. Typically use this command to get new packages or new tarballs to your server.

# wget <source>
# wget http://us2.php.net/get/php-5.2.6.tar.gz/from/this/mirror


SCP allows you to transfer files over SSH (TCP Port 22). You can even transfer files between two servers over SSH.


# scp <source> [email protected]:/path/on/remote/host

Looking for FIles

Lose a file? Need to list all files modified after a certain date? Want to remove all files with "foobar" in the name? Check out the commands below.


The find command allows you to search for a specific file by name, size or modified time. The criteria mentioned before is just part of what you can do with find. To see full functionality type "man find" to view the manual page.

# find / -name foo.atxt (this command finds all files named "foo.txt" starting in the root directory)

Another usage of find which is quite handy is the -exec flag.

# find / -name foo.txt -exec ls -lth {} \;

This command will list all files named foo.txt and run the command "ls -lth" on each file. This can be useful to apply a command to all files that match a certain string.


Use the locate command to find a specific file quickly. This is more primitive than the before mentioned find command. It relies on a database of files which it performs its lookups. To update this database run a command, appropriately named, "updatedb".

# locate foo.txt

Sorting Results

Since a Linux Administrator typically needs to sort through massive log files, show certain fields and manipulate output; an admin needs to know about the tools below.


The sort command allows you to sort the results of your output. To sort the results by the first regular character (not a symbol). Here is an example of how to use sort with the locate command:

# locate bin | sort

Piping the output of locate to sort will show all results in order.


Uniq is short for, you guessed it, unique. Uniq accepts input from STDIN (Standard Input) and shows only unique lines of text. This command basically strips duplicates.

# cat foo.txt | uniq


Awk is a pattern scanning engine. The most common usage is to separate rows of text into chunks. The chunks, by default, are separated by spaces. For instance this sentence: "The quick brown fox" when piped to this command: "awk {‘print $2’}" will print simply "quick".

# echo "The quick brown fox" | awk {‘ print $3 ‘}

This command can be very useful when combining it with long field-driven lists.


wc (Word Count) will count the number of words, newlines and bytes in a file. Typically this command is used with the "-l" flag to count the lines if output. This command accepts input from STDIN (Standard Input).

# cat foo.txt | wc -l

This means that the file "foo.txt" contains 300 lines.

Running Commands (that may take a while)

Since the command line interface (CLI) usually offers no progress bar (except for certain apps like wget), you’ll sometimes need to run a program for a long time. Searching through millions of files? Removing a directory containing large quantities of data/files? What if you get disconnected while running one of these commands in the foreground? Use one of the solutions below to run your commands.

Starting Commands in the Background

It is generally useful to start a command, which takes a long time, in the background. Think of these programs as "service" programs which run without a terminal (ssh session, or physical terminal) attached. To start a program in the background simply add a space and the ampersand (&) after the command.

# sleep 1000 &

The above command will be executed in the background. The command waits 1000 seconds to end. Check the progress if your command by issuing "ps aux | grep sleep" to view the PID and status of your command.

To force a command currently running in the foreground to run in the background press "CTRL + Z". You will then be presented the PID. Disregard the "Stopped" message. This indicates the foreground process has stopped and is now running in the background.


Using the program called "screen" allows you to run multiple virtual terminals behind the scenes. This can be useful for programs (and commands) that can’t be ran in the background. Instead of running multiple SSH sessions you can simply type "screen" to initiate a new screen. Press "CTRL + AD" to detach the current screen. Type "screen -r" to reattach to the screen(s) currently active. To install screen on CentOS/RHEL issue the following command:

# yum -y install screen

Department of Homeland Security Scraping Sites?

imageRecently I noticed that one of the web servers for my business, Admo.net, had a higher than normal load. Normally this means that someone has exploited a PHP script and is mass-mailing everyone on the ‘net. This time, however, it looks like there was an IP address, from a OrgName DHS/BSL002A. This netblock belonged to "dhs.gov”. I quickly wondered what this was and pulled up the site.

Apparently the Department of Homeland Security has been scraping a harmless gaming community’s forums for some type of information. The alarming thing was that the requests came in at 5-10 request per second. Why must they scrape the sites? If they do, why can’t they do it at a more comfortable rate? This is crazy!


CentOS 4.x – But I want PHP5 and MySQ5

This sometimes can be an issue. I want PHP5 but I only have CentOS 4.6. What can I do? It seems like the CentOS repository doesn’t have PHP5, only PHP4. Enter “–-enablerepo centosplus”. Just add “—enablerepo centosplus” after yum and you’ll be able to install PHP 5, Apache 2.0 and MySQL 5 in no time.

# yum –enablerepo=centosplus –y install php httpd mysql php-mysql php-gd

The above also works for upgrades by substituting “install” for “upgrade”.

Linux Command: diff – What’s the difference?

Sometimes it’s necessary to quickly determine the difference between two files. The command “diff” can be particularly useful if you find yourself in this situation.

The most simple usage of diff is “diff <oldfile> <newfile>”.

The output looks like this:

The output of diff is really how to alter the original file to match the new file. “1a2” means to add a new line to the old file after line 1. This line should be “bar” as signified by the “>” mark.

Often patches are distributed using the diff file. PHPBB usually offers this as a way to patch their open source code. In short, using diff can save you time and offer a way to compare to configuration files to see their differences.