Month: December 2009

HardInfo – Benchmark Linux

Benchmarking means measuring the speed at which a computer system will execute a computing task, in a way that will allow comparison between different hardware/software combinations. It does not involve user-friendliness, aesthetic or ergonomic considerations or other subjective judgment. HardInfo is a system profiler and benchmark for Linux systems. It can gather information about your…


Advanced Bash Scripting Guide

The Advanced Bash Scripting Guide is both a reference and a tutorial on shell scripting. This comprehensive book (the equivalent of 974 print pages) covers almost every aspect of shell scripting. It contains 364 profusely commented illustrative examples, a number of tables, and a cross-linked index/glossary. Not just a shell scripting tutorial, this book also…


tailf – Watch logs in realtime

The most widely used command for monitoring log file is tail. Tail binary allows a user to watch the log file grow in realy time. Watching the log file grows can be done using an additional -f parameter. Alternatively, another approach to watch a log file grows can be done using tailf binary command. Tailf:…


Redirection and Pipes on Linux

Redirection: With the > symbol you can forward the output of a command to a file (output redirection), with the < symbol you can use a file as input for a command (input redirection). Pipe: By using a pipe symbol, | you can also redirect the output similar to the < or >. With a…


List subdirectories with owner & permissions and paths

This bash one liner should give the desired results; find /var ! -user root -type d -ls modify as needed


Top 10 WordPress hacks for 2009

Top WordPress hacks of 2009 from http://www.catswhocode.com/blog/top-wordpress-hacks-of-2009 2009 has been a very prolific year for WordPress hacks. In this article, I’ll show you the most useful hacks I came across during the whole year. Enjoy! Monetizing your old blog posts Let’s start this post with a nice hack dedicated to help you make more money…


chkservd missing from CPanel / Centos

On a fresh Centos server with CPanel installed it seems that chkservd was not running. chkservd is a little CPanel utility that allows you to check from WHM what applications it will monitor, and in case there is a problem with any of those services it will restart it and send a notification to the…


Add Services to Chkservd

Chkservd is the service in cPanel that checks to make sure that services are running, then restarts them if necessary. It’s also responsible for the ‘Service Manager’ section in cPanel, which is an interface where added services can be easily checked on and off. To add a new service, create a line in /etc/chkserv.d/chkservd.conf in…


Flush memcached using BASH

If you store application data in memcache, you may want to invalidate it once you deploy a new version to avoid corruption or strange results. There are several ways to do this but the BASH way is; Flush memcache in BASH Just add this to your deploy script: echo “flush_all” | /bin/netcat -q 2 127.0.0.1…


Linux Standard Directory Structure

Directory Description / Root directory—the starting point of the directory tree. /bin Essential binary files, such as commands that are needed by both the system administrator and normal users. Usually also contains the shells, such as Bash. /boot Static files of the boot loader. /dev Files needed to access host-specific devices. /etc Host-specific system configuration…