Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!seismo!rochester!cornell!batcomputer!braner From: braner@batcomputer.UUCP Newsgroups: comp.sys.atari.st Subject: Ramblings about file safety Message-ID: <491@batcomputer.tn.cornell.edu> Date: Wed, 25-Mar-87 01:04:51 EST Article-I.D.: batcompu.491 Posted: Wed Mar 25 01:04:51 1987 Date-Received: Fri, 27-Mar-87 06:53:47 EST Reply-To: braner@batcomputer.UUCP (braner) Organization: Theory Center, Cornell University, Ithaca NY Lines: 36 [] Some notes about file safety, besides 'back it up': In my version of microEMACS, ^X^F lets you change the default file name. If you intend to save the modified file under a different name than the original, you should use ^X^F right at the start, in case you forget and press ^Z. If you want to avoid saving the file by mistake, use Alt-E. That puts micro- EMACS in 'view-only mode', where both changes _and_ saves are not allowed. In the April BYTE, in 'Best (really?) of BIX', Alex Leavens writes: > ... shell script [for micro-C-Shell] that will back up your source file, > and then run EMACS on it... > > cp $1.c $1.bak > me $1.c (since microEMACS itself does not do this). May I suggest: if (-e $1) then cp $1 $1:r.bak endif me $1 (this works with non-.c files). I call this shell script 'bak.sh', to remind myself of the extra copy it does. I would _not_ want to use 'bak' on a floppy! I usually do all my work on the RAMdisk, where that extra copy is very quick, and there is also that original copy on the floppy! Later I 'cp' the new version from RAMdisk over the old one on the floppy. Note that the 'cp' command in micro-C-Shell, when overwriting an existing file, first copies, then removes the old version. If the copy fails, you won't lose the original. (This also explains the extra disk-drive time and sounds, and the failure to overwrite a file on an almost-full disk: you get a 'write error'...) - Moshe Braner