And then:using System;
using Mono.Unix;
public class Foo {
public static void Main (string[] args) {
foreach (UnixDriveInfo d in UnixDriveInfo.GetDrives ()) {
Console.WriteLine(String.Format("drive {0} available {1}",
d.Name, d.AvailableFreeSpace));
}
}
}
mjolnir:~ # mcs -r:Mono.Posix a.csThat did the trick in figuring out why rug thought it did not have enough disk space to install updates. (Answer: the cache-directory must have an entry in fstab; just mounting it is not enough.)
mjolnir:~ # mono ./a.exe
drive / available 1136402432
drive /big available 22027657216
drive /proc available 0
drive /sys available 0
drive /sys/kernel/debug available 0
drive /proc/bus/usb available 0
drive /dev/pts available 0
drive /media/floppy available 1136402432
Before you ask, this does not mean that I'm rewriting all my shell scripts to Mono. I'm just happy to have passed this unknown territory successfully.