I've recently upgraded my NAS to a HP N54L microserver and I decided it was time to migrate to ZFS. Luckily enough, ZFS on Linux became stable enough with version 0.6.3 to be used in production so ...
Ever wondered what the longest filename is in a directory tree? This command will tell you: ben@xyz:/srv/blog$ ls -R | awk '{ print length, $0 }' | sort -rn | head -1 73 reorganising_large_directo...
I had a need to move a large directory tree on my Linux server. For this there are a number of options: Using 'mv' Of course you can just issue 'mv /sourcedir /destinationdir' and be done with it...
Two tricks I needed today and definitely want to save for future reference :) Trick 1: How to reset a 'master' branch to a different branch and push it to the remote repository Nice instructions ...
I've recently ran into a scenario where I wanted to re-organise my photo collection (basically move some files around). This folder is mirrored to a remote server with rsync for backup purposes. Rs...
This is a small but useful bash trick to apply ‘diff’ to the output of two separate commands: laptop-ben:~ benjamin$ diff <(echo a) <(echo b) 1c1 < a --- > b
One of the nicer things about Objective-C is that reflection is actually pretty easy to do. This code sample lists the methods of a class: #include <objc/runtime.h> // List the methods of t...
After 4 years of using sphpblog (which is now very much unmaintained and looks a bit outdated) I've decided to move to a new blogging solution. After lots of experimenting I ended up with Tinkerer,...
Recently my Sheevaplug was experiencing high load caused mostly by iowait. This excellent guide shows you exactly how to troubleshoot this kind of problem using tools that are usually available on ...
One tool that made my life easier when I recently discovered it: 'rename'. It allows you to specify a sed-like command line to easily search/replace part of file names like this: rename s/"SEARCH"...
A new version of content is available.