These commands were tested in HTC magic and works perfectly. In example here I was using recovery-RA-sapphire-v1.5.2H.img (you have to change the recovery image name accordingly).
First things first, copy the recovery image file into the root location of your sdcard. Then type these commands :
$ su (not required if you have root already) # mount -o remount ,rw / # flash_image recovery /sdcard/recovery-RA-sapphire-v1.5.2H.img
That’s it, done!