【巨坑】vim提示found swap file/swap file already esists

1. vim执行过程

此图包含
vim正常执行过程
vim故障常见原因
vim发生故障时候流程图

需要上传图1

2. 故障产生原因

1.同时打开1个文件
2.之前的文件没有正常保存退出 导致的

E325: ATTENTION
Found a swap file by the name "/tmp/.sds.txt.swp"
          owned by: root   dated: Mon Apr  8 11:47:56 2019
         file name: /tmp/sds.txt
          modified: YES
         user name: root   host name: oldboyedu59
        process ID: 8012
While opening file "/tmp/sds.txt"
             dated: Mon Apr  8 11:36:21 2019

(1) Another program may be editing the same file.  If this is the case,
    be careful not to end up with two different instances of the same
    file when making changes.  Quit, or continue with caution.
(2) An edit session for this file crashed.
    If this is the case, use ":recover" or "vim -r /tmp/sds.txt"
    to recover the changes (see ":help recovery").
    If you did this already, delete the swap file "/tmp/.sds.txt.swp"
    to avoid this message.

Swap file "/tmp/.sds.txt.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:

3. 解决方案

方案1 删除这个临时文件(推荐)

错误提示中 有这个文件的名字。

方案2 把临时文件的内容恢复(不推荐)

4. 故障重现

echo oldboyedu.com >/tmp/oldboy.txt 
vim /tmp/oldboy.txt 

断开连接然后重新连接。

[root@oldboyedu59 ~]# vim -r /tmp/oldboy.txt
oldboyedu.com
guoav.com
guoav.com
guoav.com
guoav.com
guoav.com
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
"/tmp/oldboy.txt" 6L, 64C written                                 
[root@oldboyedu59 ~]# 
[root@oldboyedu59 ~]# cat /tmp/oldboy.txt
oldboyedu.com
guoav.com
guoav.com
guoav.com
guoav.com
guoav.com
[root@oldboyedu59 ~]# rm -f /tmp/.oldboy.txt.swp 
[root@oldboyedu59 ~]# vim /tmp/oldboy.txt
oldboyedu.com
guoav.com
guoav.com
guoav.com
guoav.com
guoav.com
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
~                                                                                                                        
[root@oldboyedu59 ~]#

作者:老男孩教育_李导
链接:https://www.jianshu.com/p/075fee704e76
来源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
TDengine是一种高性能、高可靠的时序数据库,由中国企业开发而成。然而,有些用户认为TDengine存在许多问题,因此将其称为"巨坑"。以下是一些可能导致用户这样形容TDengine的问题: 首先,TDengine在与其他数据库集成时可能存在兼容性问题。由于其独特的架构和设计理念,一些已有的应用程序或工具可能无法直接适配TDengine。这可能导致用户需要进行大量的修改或重写现有代码,对于一些复杂的应用场景来说,这可能是一项耗时且繁琐的工作。 其次,TDengine的文档和教程相对较少。对于新用户来说,他们可能很难找到足够的资源来学习和理解TDengine的使用方法和最佳实践。这可能给用户带来一些困扰,特别是在遇到问题时很难找到解决办法。 此外,TDengine在某些方面的性能可能不如用户期望。虽然它被称为高性能数据库,但是与其他同类产品相比,TDengine可能在某些场景下的性能表现不如人意。这可能导致一些用户对TDengine的性能感到失望,并在使用过程中遇到一些瓶颈。 最后,TDengine可能也存在一些稳定性问题。尽管它被标榜为高可靠性数据库,但在实际使用中,一些用户可能遇到了一些无法解决的故障或崩溃问题。这可能对用户的业务和数据产生一定的影响,并损害用户对TDengine的信任度。 总之,尽管TDengine在性能和可靠性方面具备一定的优势,但也不能否认它目前还存在一些问题。用户在选择使用TDengine时需要充分了解其特点和局限性,并根据自身业务需求评估是否适合使用。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值