Articles tagged with: bash
Selecting CMS Software
If you are looking for an open-source content management system, your choices are likely to boil down to these three: Joomla!, WordPress, and Drupal. Professional CMS developers tend to disregard WordPress as a purely blogging …
Remove Duplicate Posts in WordPress
Below is the SQL script that will attempt to identify and remove duplicate posts in your WordPress database. This script can be useful for autoblogging. If you use plugins like WP-o-Matic to pull full-text RSS …
WordPress Backup Script
Whenever a new WordPress version comes out, I get an itch to upgrade as quickly as possible. Generally, this is not a good idea, unless you enjoy working out new software bugs and dealing with …
Shell Scripting for HPC Clusters, Part 2
This is the second installment of a multipart guide for beginner Unix sysadmins supporting HPC clusters. You can view the first part of the guide here.
Searching, Replacing, Comparing
Try to work with a large cluster and …
Shell Scripting for HPC Clusters, Part 1
This is the first installment of a multipart guide for beginner Unix sysadmins supporting HPC clusters.
“For” and “While” Loop Constructs
The main challenge of supporting a Linux cluster is ensuring a homogeneous environment. Aside from small …
Automatically Validate HTTP Proxies
Let’s say you downloaded a long list of Web proxy servers. Now you are stuck with the task of weeding out the proxies that are dead, slow, fake, or otherwise unusable. There are some applications …
Wget and User-Agent Header
As you may already know, Wget is a popular (particularly in the Unix world) command-line downloader and Web crawler application. You can read more about Wget in one of my earlier posts on the subject. …
Duplicating WordPress Installation
Whenever you upgrade your WordPress installation or do development work, it is always a good idea to be working on a copy of your main site and not on the real thing. Copying WordPress installation …
Restart Apache, MySQL When Low on Memory
Heavy traffic, hungry SQL queries, leaky applications will eventually leave your server low on memory. Apache will go on a hunt for swap space and MySQL will start freezing in thoughtful contemplation. Your hard drives …
MySQL Global Search and Replace Script
A day will eventually come when your need to find and replace a string of text in your database. You don’t know which row, or which column, or which table. Heck, you may not even …
Passing MySQL Commands from Shell Script
Running MySQL commands from a shell script is a relatively simple task that has a lot of people baffled. Some say its too complicated and suggest using PHP or Perl, others claim doing so is …
Random Filename Chooser
This is a rather peculiar little script with a purpose that may not be immediately apparent. The script will look for files in the specified folder; it will then pick one at random from the …
WordPress Quick Upgrade for Linux
Never ever upgrade WordPress to the latest version as soon as it comes out, unless you want to be the guinea pig dealing with the new bugs and incompatible plugins. Even if the new version …
Useful SysAdmin Scripts: Search-and-Replace
Let’s say you moved your server to a new network and now it has a different IP address. You know your users have a habit of hard-coding the server’s IP into their scripts. So you …
Creating print.css for WordPress
Many WordPress theme designers choose to cut some corners with their creations. One of the more important things they skip over is print.css – the stylesheet that controls your blog’s appearance when you print it. …
Find and Replace in MySQL
A simple one-line command to perform find and replace operations in MySQL:
Count users with “last”
Here is a quick example showing how to count users logged in on a particular date using the “last” command on Linux.
To display file’s modification, last access, etc
Display a file’s modification, last access and other attributes on Solaris.

Latest Comments