当前位置:网站首页>VIM, another program may be editing the same file If this is the solution of the case
VIM, another program may be editing the same file If this is the solution of the case
2022-07-04 12:36:00 【Menon research monk】
The problem is shown in
adopt vim perhaps vi When editing the file, the following appears: :
The terminal displays as follows :
Found a swap file by the name "/mydata/mysql/conf/.my.conf.swp"
owned by: root dated: Sat Jul 02 12:52:53 2022
file name: /mydata/mysql/conf/my.conf
modified: YES
user name: root host name: xx
process ID: xx
While opening file "/mydata/mysql/conf/my.conf"
CANNOT BE FOUND
(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 /mydata/mysql/conf/my.conf"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file "/mydata/mysql/conf/.my.conf.swp"
to avoid this message.
Swap file "/mydata/mysql/conf/.my.conf.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:
The screenshot is as follows :
2. Principle analysis
stay linux In order to ensure security , If the document is inconsistent
For example, multiple people edit this file, resulting in different files 、 Last edit did not exit normally
Will generate a file suffix swp File format ( Temporary exchange file , Main backup buffer contents )
The way of saving or writing files is correct , commonly swp Format files will be automatically deleted , If there is an error in writing , Temporary files will always exist , When you edit it again, you will always point to changing the file
Delete it and re edit it or restore it and re edit it
3. resolvent
adopt ls -al When viewing all the files
You can see swp Format ( Hide temporary files , Temporary buffer )
vim Edit the prompt that appears :
Solve it according to the following tips
If the file is not important , direct q sign out ,rm -rf Delete it and try again 
边栏推荐
- Iframe to only show a certain part of the page
- Global and Chinese market of piston rod 2022-2028: Research Report on technology, participants, trends, market size and share
- Openssl3.0 learning 20 provider KDF
- Bottom Logic -- Mind Map
- asp. Core is compatible with both JWT authentication and cookies authentication
- ASP. Net razor – introduction to VB loops and arrays
- [Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 7
- 'using an alias column in the where clause in PostgreSQL' - using an alias column in the where clause in PostgreSQL
- vim 出现 Another program may be editing the same file. If this is the case 的解决方法
- netstat
猜你喜欢

R语言--readr包读写数据
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 12](/img/b1/926d9b3d7ce9c5104f3e81974eef07.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 12

Star leap plan | new projects are continuously being recruited! MSR Asia MSR Redmond joint research program invites you to apply!

C语言数组

《天天数学》连载57:二月二十六日

Paper notes ACL 2020 improving event detection via open domain trigger knowledge

When synchronized encounters this thing, there is a big hole, pay attention!

MPLS experiment

What if the chat record is gone? How to restore wechat chat records on Apple Mobile

Practical dry goods: deploy mini version message queue based on redis6.0
随机推荐
Interview question MySQL transaction (TCL) isolation (four characteristics)
[solve the error of this pointing in the applet] SetData of undefined
Leetcode: 408 sliding window median
Entitas learning [iv] other common knowledge points
DVC use case (VI): Data Registry
It's hard to hear C language? Why don't you take a look at this (V) pointer
Guava ImmutableSet. Builder source code analysis, shift original code, complement code, reverse code review
【数据聚类】第四章第一节3:DBSCAN性能分析、优缺点和参数选择方法
昨天的事情想说一下
2022, 6G is heating up
Detailed explanation of NPM installation and caching mechanism
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 15
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 8
C语言:围圈报号排序问题
Snowflake won the 2021 annual database
When synchronized encounters this thing, there is a big hole, pay attention!
13、 C window form technology and basic controls (3)
In 2022, financial products are not guaranteed?
《天天数学》连载57:二月二十六日
How to use "bottom logic" to see the cards in the world?