🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #25908

Ramblings about file safety

#25908
From: braner
Date: Wed, 25 Mar 1987 06:04
36 lines
2049 bytes
[]

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
Technical Details
Message-ID: <491@batcomputer.tn.cornell.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!seismo!rochester!cornell!batcomputer!braner

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!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