Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site chinet.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!chinet!rlk From: rlk@chinet.UUCP (Richard L. Klappal) Newsgroups: net.bugs Subject: Re: Vi isn't nasty enough, so user looses lines Message-ID: <153@chinet.UUCP> Date: Fri, 23-Aug-85 03:24:32 EDT Article-I.D.: chinet.153 Posted: Fri Aug 23 03:24:32 1985 Date-Received: Sun, 25-Aug-85 04:39:27 EDT References: <2073@ukma.UUCP> Reply-To: rlk@chinet.UUCP (Richard L. Klappal) Organization: chinet, Public Access UN*X, Chicago Lines: 33 Summary: In article <2073@ukma.UUCP> david@ukma.UUCP (David Herron, NPR Lover) writes: >Problem: Vi allows users to :wq without comment when they've > deleted part of the file and written it to something else. > This can result in lost files and confused novices. > >Repeat-by: Edit a file. Delete part of the file. (dG) Write > the result to another file (:w junk). Exit by either > typing :wq or ZZ. Notice that the original is shorter. > Find backup tape. > > >Hackin's in me blood. My mother was known as Miss Hacker before she married! Not sure I understand the problem!! ZZ is shorthand for :wq :wq means write it out & quit if you don't want to modify the original (and didn't set readonly [ -R option ], the correct way to exit is :q! which is quit & discard changes. In your example it did EXACTLY what you told it to. Richard Klappal UUCP: ..!ihnp4!chinet!uklpl!rlk | "Money is truthful. If a man MCIMail: rklappal | speaks of his honor, make him Compuserve: 74106,1021 | pay cash." USPS: 1 S 299 Danby Street | Villa Park IL 60181 | Lazarus Long TEL: (312) 620-4988 | (aka R. Heinlein) -------------------------------------------------------------------------