Found a swap file by the name “~/.bashrc.swp“

Vim在编辑文件时创建的swap文件用于在异常关闭后恢复数据。如果文件正常关闭,swap文件会被删除。遇到提示存在.swap文件的情况,可以通过删除.swp文件解决。
  • 原因
    之前有文件没有正常关闭
  • 分析
    用vim打开一个文件时,会产生一个cmd.swap文件,用于保存数据。
    • 当文件非正常关闭时,可用此文件来恢复。
      • 当文件正常关闭时,此文件会被删除。
      • 当文件非正常关闭时,不会被删除,所以提示存在.swap文件。
  • 解决
    删除该.swp文件即可
rm -f .bashrc.swp

在这里插入图片描述

其实呀,人生一程谁又能定义好呢。只要是向前走,你就不会真正的倒下。面对糟糕局面依然相信自己继续前行,这本身就很了不起了。

Found a swap file by the name "~/.bashrc.swp" owned by: mmy0 dated: 二 8月 19 17:16:52 2025 file name: ~mmy0/.bashrc modified: YES user name: mmy0 host name: xhpc-X620-G40 process ID: 2443532 (STILL RUNNING) While opening file "/home/mmy0/.bashrc" dated: 五 1月 07 00:23:33 2022 (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 /home/mmy0/.bashrc" to recover the changes (see ":help recovery"). If you did this already, delete the swap file "/home/mmy0/.bashrc.swp" to avoid this message. Swap file "~/.bashrc.swp" already exists! "~/.bashrc" 117L, 3771B Swap files found: Using specified name: 1. .bashrc.swm owned by: mmy0 dated: 二 8月 19 17:27:30 2025 file name: ~mmy0/.bashrc modified: YES user name: mmy0 host name: xhpc-X620-G40 process ID: 2458462 (STILL RUNNING) 2. .bashrc.swn owned by: mmy0 dated: 二 8月 19 17:25:37 2025 file name: ~mmy0/.bashrc modified: YES user name: mmy0 host name: xhpc-X620-G40 process ID: 2457801 (STILL RUNNING) 3. .bashrc.swo owned by: mmy0 dated: 二 8月 19 17:23:16 2025 file name: ~mmy0/.bashrc modified: YES user name: mmy0 host name: xhpc-X620-G40 process ID: 2453727 (STILL RUNNING) 4. .bashrc.swp owned by: mmy0 dated: 二 8月 19 17:16:52 2025 file name: ~mmy0/.bashrc modified: YES user name: mmy0 host name: xhpc-X620-G40 process ID: 2443532 (STILL RUNNING) In directory ~/tmp: -- none -- In directory /var/tmp: -- none -- In directory /tmp: -- none -- Enter number of swap file to use (0 to quit):
最新发布
08-20
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值