Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!voder!nsc!woolsey From: woolsey@nsc.nsc.com (Jeff Woolsey) Newsgroups: comp.editors Subject: Re: wq in vi (was: FILE descriptor <-> FILE pointers) Keywords: FILE descriptors, FILE pointers, fdopen, fileno ... Message-ID: <12189@nsc.nsc.com> Date: 21 Jun 89 17:58:33 GMT References: <148@cerc.wvu.wvnet.edu.edu> <2781@solo8.cs.vu.nl> Reply-To: woolsey@nsc.nsc.com.UUCP (Jeff Woolsey) Organization: National Semiconductor, Santa Clara Lines: 14 In article <2781@solo8.cs.vu.nl> maart@cs.vu.nl (Maarten Litmaath) writes: >A dangerous command: in some versions vi does NOT check if the write operation >has been successful, but always quits. >Use `ZZ' or `:x' instead. I cannot let this go by unchallenged. ZZ is very dangerous if you used the -r flag on vi, and make no further changes. It does NOT write out your file, AND it removes the file in /tmp. I lost a two-hour editing session on a new file I was composing that way. Never again! -- -- Qualify nearly everything. Jeff Woolsey woolsey@nsc.NSC.COM +1 408 721-8162