Quick Review: Boxee Box
December 27, 2011 – 12:22 am | 3 Comments

Some of the technical issues with Boxee Box could have been fixed if the dev team was paying more attention to addressing the bugs rather than adding “features” of dubious value. In the final analysis, for the price and ease of use, Boxee Box is the best in its class and price range. You just need to be mindful of its limitations and buy it in hope of future improvements to its usability.

Read the full story »
Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Archive by Tags

Articles tagged with: bash

Remove Duplicate Posts in WordPress
December 5, 2009 – 10:28 pm | 2 Comments
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
October 23, 2009 – 1:04 pm | No Comment
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
October 23, 2009 – 12:30 pm | No Comment
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
October 10, 2009 – 12:59 am | One Comment
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
August 5, 2009 – 4:14 pm | No Comment
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
June 29, 2009 – 12:41 pm | No Comment
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
June 25, 2009 – 2:51 pm | No Comment
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
June 25, 2009 – 4:27 am | 8 Comments
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
June 25, 2009 – 3:53 am | 6 Comments
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
June 25, 2009 – 3:30 am | No Comment
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
June 17, 2008 – 9:02 pm | No Comment
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
June 13, 2008 – 6:22 pm | 2 Comments
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
June 1, 2008 – 3:03 pm | No Comment
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
May 24, 2008 – 6:35 pm | 2 Comments
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
December 28, 2005 – 11:34 am | No Comment

A simple one-line command to perform find and replace operations in MySQL:

update TABLE set COLUMN = replace(COLUMN, ‘OLD_VALUE’, ‘NEW_VALUE’);

Bookmark on Delicious Digg this post Recommend on Facebook share via Reddit Share with Stumblers Tweet …

Executing commands with ‘find’
November 21, 2005 – 11:47 pm | No Comment
Executing commands with ‘find’

To executes commands with ‘find’ use the ‘-exec’ option. Example:

find /var – type f -name "*.log" -mtime -2 -exec ls -als {} \;

English translation: Find files in /var that end with “.log” and have been …

Using more on multiple outputs
November 19, 2005 – 11:19 pm | No Comment
Using more on multiple outputs

Here’s the correct way to page four commands so they’re all controlled by “more”:

(date; netstat -i; whodo; ps -ef) | more

Bookmark on Delicious Digg this post Recommend on Facebook share via Reddit Share with …

Find largest files
November 19, 2005 – 11:17 pm | One Comment

cd to start point (is acceptable) and as super user run: ls -ailR | sort -rn +5 | more

Sample output under SuSE Linux:

deathstar:/opt # ls -ailR | sort -rn +5 | more
247704 -rwxr-xr-x 1 …

Count users with “last”
November 19, 2005 – 11:15 pm | No Comment
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
November 19, 2005 – 11:14 pm | No Comment
To display file’s modification, last access, etc

truss -vlstat -tlstat ls -l [file name]

Bookmark on Delicious Digg this post Recommend on Facebook share via Reddit Share with Stumblers Tweet about it Subscribe to the comments on this post