Sponsored Content
Full Discussion: save
Top Forums Shell Programming and Scripting save Post 64453 by swainaina on Tuesday 1st of March 2005 02:16:25 PM
Old 03-01-2005
save

hi i would like someone to assist me to find out how i can Write a script called save which copies a file into a special directory, and another called recover which copies a file back out of the special directory. The user of the script should not be aware of the location of the special directory (obviously the script will be).
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

save me!

Hi! can anyone tell me how to save a file from command line? Any help appreciated. (2 Replies)
Discussion started by: hufs375
2 Replies

2. UNIX for Advanced & Expert Users

Can't save a file

There is a file A.lcf. I am updating the file and saving it . But as soon as I am logging off and then logging in I am finding that the updated changes are not there in the file. (5 Replies)
Discussion started by: suchismitasuchi
5 Replies

3. UNIX for Dummies Questions & Answers

save history

Hi there, How can I add the current session command history to .bash_history? During a session, I type several commands. If I close my session, those commands are added to the file .bash_history. But if my session crashes or just if I loose connection, those commands are lost. Is there... (6 Replies)
Discussion started by: chebarbudo
6 Replies

4. Shell Programming and Scripting

Save cURL verbose output to file or do it like browser "save as.."

hi there ! i have exactly the same problem like this guy here https://www.unix.com/shell-programming-scripting/127668-getting-curl-output-verbose-file.html i am not able to save the curl verbose output.. the sollution in this thread (redirecting stderr to a file) does not work for me.... (0 Replies)
Discussion started by: crabmeat
0 Replies

5. Shell Programming and Scripting

Save abbrevations in vi

Hi, ¿how i can to save abbrevations in vi? (4 Replies)
Discussion started by: Leo Gutierrez
4 Replies

6. UNIX for Dummies Questions & Answers

how to save changes to a file

is i want to sort or delete lines etc etc to a file, how do i save the changes. example i do sort file > file when i do cat file, all data is erased. thanks. (2 Replies)
Discussion started by: hobiwhenuknowme
2 Replies

7. Post Here to Contact Site Administrators and Moderators

How do I save a post?

I have run into old threads/posts that I'd like to save for future reference. Is there a way to mark the thread or save to my favorite? Is this the same as subscribing? I don't really want to subscribe. I just want to save something I find interesting I can come back to later. Thanks. (2 Replies)
Discussion started by: giannicello
2 Replies

8. Shell Programming and Scripting

From .gz to .7z to save space

Hi all, my log server is completely full with logs. I have used gzip to compress logs, but as i tried, 7z has a better compression, it saves the half size of my server. I want to uncompress .gz files, then compress them to .7z Can you please help me with a script that does this: 1.... (2 Replies)
Discussion started by: arrals_vl
2 Replies

9. Shell Programming and Scripting

Save value from output of Corestat and save in a list for each core

I am trying to modify the "corestat v1.1" code which is in Perl.The typical output of this code is below: Core Utilization CoreId %Usr %Sys %Total ------ ----- ----- ------ 5 4.91 0.01 4.92 6 0.06 ... (0 Replies)
Discussion started by: Zam_1234
0 Replies

10. UNIX for Dummies Questions & Answers

Get a data and save

If I have a A.log 1 Air Flow Monitor : 34.070 Degrees C 2 Air Flow Monitor : 41.730 Degrees C 3 Air Flow Monitor : 35.340 Degrees C 4 Air Flow Monitor : 33.370 Degrees C 5 Air Flow Monitor : 36.770 Degrees C 6 Air Flow Monitor : 45.910 Degrees C 7 Air Flow Monitor ... (1 Reply)
Discussion started by: sabercats
1 Replies
RECOVER(6)							   Games Manual 							RECOVER(6)

NAME
recover - recover a NetHack game interrupted by disaster SYNOPSIS
recover [ -d directory ] base1 base2 ... DESCRIPTION
Occasionally, a NetHack game will be interrupted by disaster when the game or the system crashes. Prior to NetHack v3.1, these games were lost because various information like the player's inventory was kept only in memory. Now, all pertinent information can be written out to disk, so such games can be recovered at the point of the last level change. The base options tell recover which files to process. Each base option specifies recovery of a separate game. The -d option, which must be the first argument if it appears, 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/nethack- dir). For recovery to be possible, nethack must have been compiled with the INSURANCE option, and the run-time option checkpoint must also have been on. NetHack normally writes out files for levels as the player leaves them, so they will be ready for return visits. When check- pointing, NetHack also writes out the level entered and the current game state on every level change. This naturally slows level changes down somewhat. 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. Since recover must be able to read and delete files from the playground and create files in the save directory, it has interesting interac- tions with game security. Giving ordinary players access to recover through setuid or setgid is tantamount to leaving the playground world-writable, with respect to both cheating and messing up other players. For a single-user system, this of course does not change any- thing, 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. SEE ALSO
nethack(6) 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. recover should be taught to use the nethack playground locking mechanism to avoid conflicts. 4th Berkeley Distribution 9 January 1993 RECOVER(6)
All times are GMT -4. The time now is 04:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy