Contents

Pmount-hal + cd

Contents

If you’re like me, and don’t use Gnome or KDE, then you probably use the pmount or pmount-hal applications to mount removable media. Here’s a neat thing to add to your .bash_aliases:

1
2
3
4
5
function pmh {
    pmount-hal $1
    UDI=`hal-find-by-property --key block.device --string $1`
    cd "`hal-get-property --udi $UDI --key volume.mount_point`"
}