Difference between revisions of "Recover"

From NetHackWiki
Jump to navigation Jump to search
(Using the file again)
Line 22: Line 22:
 
===Using the file again===
 
===Using the file again===
  
Note: Not sure, if you really need to do all the steps bellow.
+
Once you executed the recover command successfully.
  
*Once you executed the command successfully. You need to give the created file the correct ownership and group.
+
*You need to give the created file the correct group.
  
in general run the commands:
+
in general run the command:
  
'''chown <username> ./<UIDusername>'''<br />
+
'''chgrp games <UIDusername>'''
'''chgrp games ./<UIDusername>'''
 
  
 
in the example:
 
in the example:
  
chown bob ./1000bob<br />
+
chgrp games 1000bob
chgrp games ./1000bob
 
 
 
(when it will be compressed, owner and group are preserved. This is why you have to change them now.)
 
  
 
*then, you compress it with:
 
*then, you compress it with:
  
'''gzip ./<UIDusername>'''
+
'''gzip <UIDusername>'''
  
 
in the example:
 
in the example:
  
gzip ./1000bob
+
gzip 1000bob
  
this will create a fille with the extention ".gz" or "<UIDusername>.gz". In the example "1000bob.gz".
+
this will create a file with the extension ".gz" or "<UIDusername>.gz". In the example "1000bob.gz".
  
 
*then copy it in the save directory:
 
*then copy it in the save directory:
  
'''sudo cp ./<UIDusername>.gz <playground>/save/'''
+
'''sudo cp -p <UIDusername>.gz <playground>/save/'''
 
 
in the example:
 
 
 
sudo cp ./1000bob.gz /var/games/nethack/save/
 
 
 
*finally give again the correct ownership and group to the copied file.
 
 
 
'''sudo chown <username> <playground>/save/<UIDusername>.gz'''<br />
 
'''sudo chgrp games <playground>/save/<UIDusername>.gz'''
 
  
 
in the example:
 
in the example:
  
sudo chown bob /var/games/nethack/save/1000bob.gz<br />
+
sudo cp -p 1000bob.gz /var/games/nethack/save/
sudo chgrp bob /var/games/nethack/save/1000bob.gz
 
  
hopefully, you can play now. Ask for [[freenode|help]] if this is too much for you.
+
*Finally. Hopefully, you can play now. Ask for [[freenode|help]] if this is too much for you.
  
 
===[[Vulture's]]===
 
===[[Vulture's]]===

Revision as of 15:55, 11 November 2014

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.

Unfortunately, the utility is not totally automated. You need to know some basics about the command line. If you have difficulties ask for help.

Linux/Unix

Running the command

On Linux and other Unixen, you usually invoke recover like this:

<fullPath>recover -d <playground> <UIDusername>

for ubuntu systems, that would be something like this:

/usr/lib/games/nethack/recover -d /var/games/nethack 1000Bob
  • <fullPath>recover Actually, the utility is not a normally accessible command, you need to use the full path to the executable. In Ubuntu systems, the full path is "/usr/lib/games/nethack/".
  • <playground> is the Playground path where the temporary level files were put during gameplay. In Ubuntu systems, that would be "/var/games/nethack/save"
  • <UIDusername> is the file name of the temporary files, without extension. You can easily guess it by inspecting the Playground. They are two components, the "UID" and the "username". It's the UID and username of the user on the system. The UID is a number unique for a user. On single user systems, the UID is usually "1000". The "username" is just the user name or log in .

If you are using official NetHack and your distribution does not come with recover you can download it from the official download-page at http://www.nethack.org/. Check first the other installed files.

Using the file again

Once you executed the recover command successfully.

  • You need to give the created file the correct group.

in general run the command:

chgrp games <UIDusername>

in the example:

chgrp games 1000bob

  • then, you compress it with:

gzip <UIDusername>

in the example:

gzip 1000bob

this will create a file with the extension ".gz" or "<UIDusername>.gz". In the example "1000bob.gz".

  • then copy it in the save directory:

sudo cp -p <UIDusername>.gz <playground>/save/

in the example:

sudo cp -p 1000bob.gz /var/games/nethack/save/

  • Finally. Hopefully, you can play now. Ask for help if this is too much for you.

Vulture's

For vulture's eye, the name is hard-coded to alock. The command is something like this:

vultureseye-recover -d <playground> alock

SLASH'EM

For SLASH'EM, it's almost the same as for nethack. Simply replace "nethack" with "slashem". So the example becomes:

/usr/lib/games/slashem/recover -d /var/games/slashem 1000bob

External links