vi编辑文件保存后,提示“Can't open file for writing Press ENTER or type command to continue”
来源:互联网 发布:证券从业资格证知乎 编辑:程序博客网 时间:2024/06/05 05:32
在linux上使用vi命令修改或者编辑一个文件内容的时候,最后发现使用<Esc+:+wq!>无法保存退出,却出现,如下提示:
E212: Can't open file for writing Press ENTER or type command to continue
出现这个错误的原因可能有两个:
1.当前用户的权限不足;
2.此文件可能正被其他程序或用户使用。
一般错误原因都是前者,解决方案是在使用vi命令打开文件时,前面加上sudo来临时提供管理员权限,比如使用命令“sudo vi test.txt”打开编辑文件。
由此看来,sudo命令是很有用的,当我们执行某种操作系统提示诸如“operation not permitted”等权限不足信息时,我们很多时候都可以在命令前面加上sudo来解决权限不足问题。
比如从linux服务器上下载某一个文件或上传某一个文件有可能提示这个,也有肯能直接上传不成功但是什么都没提示;这时可以考虑是不是账号的权限不足,加个sudo试试。
原文地址:http://www.cnblogs.com/ylq1990/p/6410549.html
0 0
- vi编辑文件保存后,提示“Can't open file for writing Press ENTER or type command to continue”
- 出现Press ENTER or type command to continue的原因
- vi 新建文件保存文件时遇到的问题:E212: Can't open file for writing
- vim保存退出提示can't open file for writing
- vi编辑文件出现Can't open file for writing错误
- vi / vim保存文件时遇到的问题:E212: Can't open file for writing
- vi E212:Can't open file for writing 报错
- vi E212:Can't open file for writing 报错
- Linux :: vi E212: Can't open file for writing
- Linux :: vi E212: Can't open file for writing
- Linux :: vi E212: Can't open file for writing
- vim Can't open file for writing
- E212: Can't open file for writing
- linux操作提示:“Can't open file for writing”或“operation not permitted”的解决办法
- linux操作提示:“Can't open file for writing”或“operation not permitted”的解决办法
- vim E212:Can't open file for writing 报错
- "/host.conf" E212: Can't open file for writing
- vim <路径+文件名> e212 can't open file for writing
- hdu 5814 Find the Period
- 基于深度学习的图像文字识别
- Android Animations动画使用详解
- 安卓常用控件
- 一个简单的使用EVP框架的加密过程
- vi编辑文件保存后,提示“Can't open file for writing Press ENTER or type command to continue”
- 小话设计模式原则之:单一职责原则SRP(C#篇)
- delphi DCC32命令行方式编译delphi工程源码
- Linux学习日志(14)- uboot根目录下的config.mk文件学习
- 最新Android API Level一览
- python: numpy -- zeros,ones,eyes函数
- jquery获取checkbox与radio的value
- Web基础之HTML入门
- 关于SystemUI状态栏显示黄色背景的问题