Path: utzoo!attcan!uunet!cs.utexas.edu!meyering From: meyering@cs.utexas.edu (Jim Meyering) Newsgroups: comp.editors Subject: vi Warning: ":wq" may destroy your file Keywords: vi's `:wq' command with nearly full disk Message-ID: <971@latexo.cs.utexas.edu> Date: 20 Oct 90 23:56:38 GMT References: <1846@calmasd.Prime.COM> <1990Oct9.013103.18799@mthvax.cs.miami.edu> <58374@microsoft.UUCP> Distribution: na Organization: U of TX at Austin CS Dept Lines: 19 In discussing minimal vi command sets for beginners, this is one of the commands suggested. >:wq write (save edits) and quit Please be careful when using this command on files in nearly full disk partitions. In at least one releas of Sun's (I think it was Sun Unix 3.5) vi, this command *attempts* to write the file, then quits unconditionally, EVEN IF THE WRITE FAILED. Use `:x' instead. Or use :w, then :q. This wouldn't be such a big deal, but when this bug is exercised, you'll lose the entire file, not just your modifications. I haven't tested vi for this bug on other systems/releases, but noticed that a fix wasn't mentioned in the SunOS 4.1 bug fixes posted here recently. -- Jim Meyering meyering@cs.utexas.edu