Scripting

Change desktop images based on CPU load via a script

On a few recent occasions, I have had to catch and fix runaway CPU-hog zombie processes. Usually, I notice these after a being frustrated for a period of time by slow machine response times. Using the w command in a terminal shows that my CPU load is too high, but I often don’t think to […]

Read More
Scripting

Lage kalender fra konsoll

Utskrift av gjeldende måned cal April 2007 Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Utskrift av hele året cal -y

Read More
Linux

Recover a dead hard drive using dd

The Unix program dd is a disk copying util that you can use at the command line in order to make a disk image. It makes a bit-by-bit copy of the drive it’s copying, caring nothing about filesystem type, files, or anything else. It’s a great way to workaround the need for Norton Ghost. Normally, […]

Read More
Scripting

rsync backup on a local pc

#!/bin/bash echo “Starting Daily rsync backup on `date`” for FSYS in /home/username/rsync do /usr/bin/rsync -aE –delete $FSYS /home/username/rsync_bck if [ $? != 0 ]; then echo ” ==> Error during rsync of $FSYS” else echo “rsync of $FSYS OK on `date`” fi done echo “Finished Daily rsync backup at `date`”

Read More