shell script

MyDumpSplitter-Extract split database or tables from mysqldump | MySQL dump splitter

The Mysqldumpsplitter can extract database, table, all databases, all tables or tables matching on regular expression from a mysqldump. It can produce the compressed output of sqls in specified directories. The tool has undergone a complete rewrite, and there are many more functionalities added. Please follow GitHub Repository for future changes or further improvements. Download the the tool from GitHub Repository. I have prepared a separate blog post to getting started with the mysqldumpsplitter. It’s a sort of guide for doing required and possible operations with the mysql-dump-splitter script. Read the mysqldumpsplitter recipe blog post here. Current version is 6.1....

Simple Shell Script to Monitoring Disk Space on a Linux Machine

This article explain a way to get a mail as soon as the disk usage reaches to its critical level to avoid issues later. To set a simple monitor on Linux / Unix, I have two simple scripts: DSAlert.sh : Shell script for retrieving disk space percentages and put in to a cron job. DiskSpace_Alert.pl : Perl script for sending an email. Following is the disk monitor shell script which will execute the perl file for sending alert email. #DSAlert.sh #!/bin/sh #Retrive disk space info df=`df -Pl  | grep “^/dev” | awk ‘{print $5, $6}’ | sed “s/%//”` #Reference: df echo “$df” | while read percent fs do #If Disk...