[net.unix-wizards] backup files ending with ~

walton@Ll-Xn@sri-unix (10/31/82)

From: Robert Walton <walton@Ll-Xn>
Date: Thu, 28 Oct 1982 0554-EDT
We do not run EMACS, but for years Groups 22 and 21 and Lincoln Lab
have run a program called backup that takes a file xxx
and makes backups named xxx~, xxx=, and xxx- and a program called release
that destroys backups while maintaining a diff record file
named xxx: .  These programs constitute a poor mans SCCS, and are
virtually indispensible.  They are also used for binary files, with
diff surpressed, of course.

The programs complain about 14 character names, and will not accept them.
Trying to be sure that a file named sim_convolve.c is only 13 characters
is no worst than trying to be sure it is only 14 characters.  Some names
simply have to be abbreviated.

If you are interested, the rest of this message is a more exact description
of backup and the differences of meaning between - = and ~.  Backup is
initially applied to a readonly file xxx, having no backups,
not owned by you, but in a directory writable by you.
It mv's xxx to xxx~ and cp's xxx~ back to xxx, making you the owner,
and giving you only write permissions.  (The cp also preserves the
date of last modification, unlike normal cp.)  If you run backup again,
xxx is mv'ed to xxx= which is made readonly, and then cp'ed back to xxx
which remains read-write by you only.  If you run backup again xxx- is
made similarly.  If you run it again, xxx- is mv'ed to xxx= and then
xxx- is made as before: in other words, xxx~ comes from the first backup,
and xxx= and xxx- form a pushdown list of subsequent backups.  Release
removes all backups after doing a diff xxx~ xxx and appending that
preceded by your name and the date to xxx: (if xxx is not binary).
Release also leaves xxx read-only.  Variant action is taken for suid
files, if you have sufficient privileges.

Backup and release go into the dark ages before SCCS was ever public.
They have remained because of the belief that they must be simpler
for users who do not need the additional features of SCCS.