Recover

recover is the small utility program that comes with NetHack. It is used to turn temporary level files into a save file, for example after a power outage during a game.

On Linux and other unixen, you usually invoke recover like this: recover -d savedir 1031foo where savedir is the path where the save file should be put, and 1031foo is the file name of the temporary files, without extension.