Scripting

Randomize filenames

This is a simple bash script to create random filenames of all jpg-files (*.jpg) in a folder using the linux commands mv, sha1sum and cut. #!/bin/bash # Randomize filenames for fname in *.jpg; do mv “$fname” $(echo “$fname” | \ sha1sum | \ cut -f1 -d ‘ ‘ | \ cut -b 1-5).jpg done The […]

Read More
Scripting

Datarecovery using Ubuntu Linux

This post describes my workflow in recovering data from defective harddrives. These harddrives are usually not readable in Windows and in most cases not even readable or mountable in linux as well. One of the great things with linux is all the tools that are available, just do a Google search and you find forum […]

Read More
Web

Redirect failing URLs to other webserver

A typical FAQ about URL rewriting is how to redirect failing requests on webserver A to webserver B. Usually this is done via ErrorDocument CGI-scripts in Perl, but there is also a mod_rewrite solution. But notice that this performs more poorly than using an ErrorDocument CGI-script! Place this in your httpd.conf og .htaccess file on […]

Read More