Posts

Showing posts from September, 2008

bash script to check left space on device

This is a very simple bash script intended to be used for checking the space on every partition from your hardisk #!/bin/bash PROG_NAME="space_usage" #Set usage USED_SPACE="95" #log file if you want to use log file LOG_FILE="space.txt" #email address EMAIL="user@localhost" SEND_EMAIL="N" #crontab every night at 12 #0 0 * * * root space.sh function log() { /usr/bin/logger -i -p kern.crit -t ${PROG_NAME} "UPSS: ${i[5]} has used more than $USED_SPACE % space" echo "UPSS: ${i[5]} has used more than $USED_SPACE % space" >> $LOG_FILE #send email if [ $SEND_EMAIL == 'Y' ] then mail -s "no more space on ${i[5]} " $EMAIL fi } #grep mounted partitions df -k -P --sync |grep -v "Mounted" | while read i; do i=( ${i} ) #echo mounted partitions #echo ${i[5]} USED=`df ${i[5]} | awk '{print $5}' |grep -v "Use%" | cut -f1 -d%` #

BitDefender RescueCD

The BitDefender Unices team is re-mastering a rescue cd based on Knoppix Live CD. The re-mastered CD will be capable of scanning and disinfecting all your existing hard drives (including NTFS partitions) before your OS boots. To use this RescueCD, you need to be familiar with a few basic notions, such as: what is a partition and what type of internet connection you have. Another condition would be that you should not be afraid to use the console to type commands and read the manual. The new CD will provide a few tools for data rescue, partition size changes and basic forensic networking. Its main feature is that after the boot, all detected and mounted partitions on your hard drive will be automatically scanned by our antimalware scanner, bdgui. Bdgui is a frontend for bdscan and it was designed to make the disinfection procedure easier for the common user. Plus it looks cool :-). More info here: http://unices.bitdefender.com/?p=12 If you want to download the iso go here : http://dow

How to disable Talk in Mediawiki

MediaWiki is a free software wiki package originally written for Wikipedia. I'm using mediawiki to document my projects. Anyway, if you want to disable Talk in media wiki follow the next steps. cd your_mediawiki_dir/include cp SkinTemplate.php SkinTemplate.back (just in case) mcedit/vi SkinTemplate.php search for <strong>$content_actions['talk']</strong> uncomment this line /* $content_actions['talk'] = $this->tabAction( $talkpage, 'talk', $this->mTitle->isTalkPage() && !$prevent_active_tabs, '', true); */ The end :)