Entries from April 1, 2010 - April 30, 2010

Friday
Apr022010

White and Grey (and Black) Fungus

Fungus Kretzschmaria deusta (= Ustulina deusta) growing on a decaying log.  This fungus can dangerously weaken tree trunks, causing them to break.  The white and grey growths are the immature fruiting bodies which appear in the spring.  As they mature, they harden and turn black, as shown in the following photo:

Photos taken in the Wilderness, Whiteknights Park, Reading University grounds, Reading, UK, on 2010-03-23 and 2010-03-28, respectively.

Thursday
Apr012010

Redirecting Symbolic Links to Directories

Suppose you are developing a website for a Linux system and you want to release it in various stages to the users. One of the ways to do this is to have a separate subdirectory for each version and to use a symbolic link (symlink) to point to the latest one. However, redirecting the symbolic link can be a bit tricky and my first attempts ended up with the link sitting inside one of the directories, instead of at the top level. The secret is to use the -n option to suppress dereferencing. Here is a simplified example illustrating how I got it to work properly:

$ mkdir dir1
$ ln -sfn dir1 latest
$ ls -l
total 4
drwxr-xr-x 2 tristram tristram 4096 2010-04-01 22:13 dir1
lrwxrwxrwx 1 tristram tristram 4 2010-04-01 22:13 latest -> dir1
$ mkdir dir2
$ ln -sfn dir2 latest
$ ls -l
total 4
drwxr-xr-x 2 tristram tristram 4096 2010-04-01 22:13 dir1
drwxr-xr-x 2 tristram tristram 4096 2010-04-01 22:13 dir2
lrwxrwxrwx 1 tristram tristram 4 2010-04-01 22:13 latest -> dir2
$

The -s and -f options select symbolic (as opposed to hard) links and force overwriting of the existing link.  For more details see the Gnu Coreutils documentation for the ln command.

Thursday
Apr012010

Orange Cranefly

From early last summer: a limoniid cranefly, Limonia phragmitidis (Diptera: Limoniidae), recognisable by the orange body and the 3 dark spots on the leading edges of the wings. Here is a photo of another specimen that I took a couple of weeks earlier.

Photo taken in Whiteknights Park, Reading University grounds, Reading, UK, on 2009-06-04.

Page 1 ... 3 4 5 6 7