[Sussex] vi
Nico Kadel-Garcia
nkadel at gmail.com
Fri Feb 1 23:40:55 UTC 2008
Jon Greenwood wrote:
> Remembered on the train in ...
>
> :wq!
>
> This is bad. Always use :wq if you want to write and quit.
>
> Why?
>
> If you perform :wq! on a file on a full file system (e.g. a developer
> homespace NFS share), your edits will fail to write, then because
> you've shrieked at vi, it will exit taking all of your edits with it.
> You have no second chances to write to a different partition ... your
> magnum opus is lost.
>
> Hands up those here who've done this. (And yes, my hand is up)
>
>
> Jon
Unfortunately, if the file has permissions "444" and you don't want to
manually go and change it, you use ":wq!" This happened to me yesterday,
editing an RCS logfile to break the lock.
More information about the Sussex
mailing list