Category Archives: Bash

Restore from a MySQL dumpfile

If you are a longtime user of mysqldump you may have experienced that restoring with mysql < dumpfile doesn’t always work because of referential problems. Here is a little script that takes care of it: mysql-restore.txt.

Posted in Bash | Leave a comment

Backup script

The current shell server i’m using returns bogus output for commands like df. Mind the negative value for 1-k blocks. timvw@localhost:~$ df Filesystem 1k-blocks Used Available Use% Mounted on /dev/hda1 -780429856382 1 0 74% / It thought it would be … Continue reading

Posted in Bash | Leave a comment

Listen to online radio

#!/bin/sh # # Author: Tim Van Wassenhove <timvw@users.sourceforge.net> # Update: 2004-05-21 02:50:31 # # This script allows you to listen to Belgian online radio streams. # if [ "$1" == "" ]; then echo " [1] Radio 1 [2] Radio … Continue reading

Posted in Bash | Leave a comment

Kill a user and his processes

#!/bin/sh # # Author: Tim Van Wassenhove # Update: 12-12-2003 13:15 # # This script kills all processes that are owned by a given user. # if [ -n "1" ] then ps -ef | grep $1 | grep -v … Continue reading

Posted in Bash | Leave a comment