Nerd Data

None of this is earth-shattering or original. But I do find these little tidbits useful.

Map caps lock to control under win32

I used the scancode map technique outlined here to generate a registry entry file that overwrites the caps lock key with control on NT-based Win32 OSes.

Under X, I used to use cargo-cult .xmodmap invocations, but now I just download and build a copy of xkeycaps when I need to remap things differently.

If this doesn't do what you want, you should check out this wiki that discusses control and capslock switching in gory detail.

Disk usage under linux

According to Ken Thompson (though I've seen this attributed to others as well) "The steady state of disks is full". I use the following goofy little incantations to figure out where the space has gone. I also recommend Filelight (which I found via SweetCode) for a pleasing graphical representation of disk usage.

Space usage of RPM packages

rpm -qa --queryformat "%14{SIZE} %{NAME}\n"  | sort -nr
      

Space usage of all files

find . -xdev -ls | sort -nr +6
      

Per-directory space usage

I use a File::Find-based perl script to generate a list of usage by directory.