ron@wjvax.UUCP (Ron Christian) (09/29/84)
() Well, I'm not a unix wizard exactly, but for a user's point of view: I implemented a 'miltiple files' gimmic on 4.2 BSD with a couple aliases. Not hard to do, you can append sequential numbers (or even the date) to new files one each during the edit/compile/run cycle. Or push them up a queue (foo.old foo.reallyold foo.reallyreallyold, etc) automagically. Had an alias 'backup' that would do this, then nested it into 'cc' alias. (You could put it in the makefile, too.) Anyway, I soon abandoned the practice after I discovered that when something DID barf, often as not I knew right away where I bungled, or, the error was so deeply embedded that I'd have to give up several nifty (working) features I had added to go far enough back to not have the bug. I still have the 'backup' command, but it only creates ONE backup, and I have to initiate it. (To guard against serious fumbles while in 'vi'.) New hacks to code are always marked (/*TEST TEST TEST*/ or some such) and I can almost always remove a couple generations of changes successfully. What more do you need? -- "Trivia is important." Ron Christian (syntax bug) Watkins-Johnson Co. San Jose, Calif. (...ios!wjvax!ron)
bsa@ncoast.UUCP (Brandon Allbery) (10/02/84)
> Article <> > From: ron@wjvax.UUCP (Ron Christian) > I still have the 'backup' command, but it only creates ONE backup, > and I have to initiate it. (To guard against serious fumbles while > in 'vi'.) ... What more do you need? What more?... well, what about your nice, new, fancy report generator which you compiled with `cc reportgenerator.c functions.o' and then tried to get rid of the extra -o file -- and typed `rm reportgenerator.c' instead of the correct file? I have aliased rm to rm -i now that it's too late (yes, I did that!), but it isn't always enough. I have a front-end to vi which backs up all files edited, overwriting an old backup. The only problem I had with it was that I was lazy, so 'vi +n file' no longer worked, a problem which could easily be fixed. And the backups have saved my hide quite a few times at work. THAT more do I need. --bsa
john@genrad.UUCP (John Nelson) (10/04/84)
I have found that I don't need any backup versions of files - but that the "rm" command is too dangerous. I tend to type before I think, and thus do the wrong thing. I therefore alias rm to: alias rm \'ls\' -d \!\* \> ~/.backup/.lastremoved \;mv \!\* ~/.backup alias ri /bin/rm The .lastremoved stuff is for a script "unrm" which restores the last thing I removed. A simpler version would be "alias rm mv \!\* ~/.backup" In my .logout file, I use this to clean up the .backup directory: ( 'rm' -rf ~/.backup/* ~/.backup/.??* >& /dev/null & ) One of my co-workers uses a similar alias for "vi". That way any file edited is also copied to the backup directory.
jwp@sdchema.UUCP (John Pierce) (10/07/84)
> ... and then tried to get rid of the extra -o file -- and typed > `rm reportgenerator.c' instead of the correct file ... Which is why god created 'make', and 'make clean'