RECOVER(6)
πΎ RECOVER(6) β the games manual page, bestie edition β¨
okay so picture this: it's RECOVER(6), from the Games Manual section, and she is here to save your NetHack run from the absolute void. buckle up π
πΈ NAME πΈ
recover β the girl who recovers a NetHack game that got interrupted by disaster π
β¨ SYNOPSIS β¨
recover [ -d directory ] base1 base2 ...
π DESCRIPTION π
okay so like, every once in a while a NetHack game gets straight-up interrupted by disaster when the game or the whole system crashes π. before NetHack v3.1, those games were justβ¦ gone. lost. deceased. because stuff like the player's inventory was only ever kept in memory π« .
but NOW? all the pertinent information can be written out to disk, so those games can be recovered at the point of the last level change. slay π β¨
so the base options tell recover which files to process. each base option specifies recovery of a separate game β one base, one game, no mixing, iykyk.
then there's the -d option, which β and this is important, bestie β must be the first argument if it appears π«Ά. it supplies a directory which is the NetHack playground. it overrides the value from NETHACKDIR, HACKDIR, or the directory specified by the game administrator during compilation (usually /usr/games/lib/nethackdir).
NetHack normally writes out files for levels as the player leaves them, so they'll be ready for return visits π. when checkpointing, NetHack also writes out the level entered and the current game state on every level change. this naturally slows level changes down somewhat β small price, big vibes π.
now, the level file names are of the form base.nn, where nn is an internal bookkeeping number for the level π’. the file base.0 is used for game identity, locking, and, when checkpointing, for the game state. various OSes use different strategies for constructing the base name:
- π₯οΈ microcomputers use the character name, possibly truncated and modified to be a legal filename on that system
- π₯ multi-user systems use the (modified) character name prefixed by a user number to avoid conflicts, or
"xlock"if the number of concurrent players is being limited
it may be necessary to look in the playground to find the correct base name of the interrupted game π. recover will transform these level files into a save file of the same name as nethack would have used. iconic behavior, honestly π
β οΈ okay so this part is serious: sincerecovermust be able to read and delete files from the playground and create files in the save directory, it has interesting interactions with game security π. giving ordinary players access torecoverthroughsetuidorsetgidis tantamount to leaving the playground world-writable β with respect to both cheating and messing up other players. no cap, that's the whole drama.
for a single-user system, this of course does not change anything, so some of the microcomputer ports install recover by default π.
for a multi-user system, the game administrator may want to arrange for all .0 files in the playground to be fed to recover when the host machine boots, and handle game crashes individually. if the user population is sufficiently trustworthy, recover can be installed with the same permissions the nethack executable has. in either case, recover is easily compiled from the distribution utility directory π οΈβ¨
π¦ NOTES π¦
like nethack itself, recover will overwrite existing savefiles of the same name π. savefiles created by recover are uncompressed; they may be compressed afterwards if desired, but even a compression-using nethack will find them in the uncompressed form. so likeβ¦ you can zip her, but she doesn't need it π
π SEE ALSO π
π BUGS π
recover makes no attempt to find out if a base name specifies a game in progress π¬. if multiple machines share a playground, this would be impossible to determine. so, yeah, that's just how it is.
recover should be taught to use the nethack playground locking mechanism to avoid conflicts. noted. on the list. someday. π«
π COPYRIGHT π
this file is Copyright (C) Kenneth Lorber, 2024 for version NetHack-5:1.12. NetHack may be freely redistributed. see license for details π
and that's the whole page, bestie!! π«Ά this little number comes to you from the fine folks at NETHACK, dated 26 April 2026, and yes β she's still filed under RECOVER(6) at the bottom, because some things never change π
β¨πΈ
π¦ where this page comes from
- arch rolling: nethack 5.0.0-2 Β· NGPL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms