无法创建备份文件(添加!以覆盖) [英] Cannot create backup file(add ! to overwrite)
问题描述
需要帮助.我一直在vi中编辑文本文件,以前可以保存更改,但是现在每当我输入命令来保存文件时,我都会收到上述错误.请帮忙.
Need help. I have been editing a text file in vi , and i was able to save the changes before but now i am getting the above error whenever i am typing command to save the file. Please help .
推荐答案
您可以按照 vi
(或更可能是 vim
)所说的强制写在做:
You can, as vi
(or, more likely, vim
) is saying force a write by doing:
:w!
或者,将文件写入其他位置:
Alternatively, write the file to an alternative location:
:w! /path/to/other/location
要检查备份文件的写入位置(通常):
To check where your backup files are being written (normally):
:se backup? backupdir? backupext?
尝试对该目录中的文件进行 touch
,并查看您的操作系统是否给您一个错误,以启发您为何编辑器无法在其中进行写操作.
Try to touch
a file in that directory and see if your Operating System gives you an error to enlighten you as to why your editor cannot write there.
这篇关于无法创建备份文件(添加!以覆盖)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!