Linux

rpm and yum stop working on Fedora Core 5

yum and rpm stop doing their magic because of corrupt files etc and no updates can be performed on the system. A simple, but maybe not recommended solution is to delete the files located in /var/lib/rpm -rw-r–r– 1 root root 0 Jan 22 10:10 __db.000 -rw-r–r– 1 root root 24576 Jan 19 17:12 __db.001 -rw-r–r– […]

Read More
Photo etc

Improved watermark script with imagemagick

#!/bin/bash # Use a shell loop #mkdir thumbnails if [ ! -f *.JPG ] ; then echo “Ingen filer tilgjengelig!” else for file in *.JPG do width=`identify -format %w ${file}`; \ convert -background ‘#0008’ -fill white -gravity center -size ${width}x90 \ -font Sketchy -pointsize 50 \ caption:”Copyright © 2007 Pario.no” \ +size ${file} +swap -gravity […]

Read More
Scripting

Resize of images in a folder with imagemagick

#!/bin/bash # Hans-Henry Jakobsen # Script som bl.a resizer bilder og legger de i rett mappe # NB! ikke bruk originalfil da dette script sletter fila # Sjekker at mapper eksisterer if [ ! -d 320 ] then mkdir 320 fi if [ ! -d 480 ] then mkdir 480 fi for file in $(ls|grep […]

Read More